Xming is a great little app that allows you to utilize X11 port forwarding in Putty. What is X11 port forwarding you say? It is the means of calling a program to run on your *nix box but displaying it remotely on your terminal. All you really need is Putty and X running on your server.
So I had installed the Xming setup and fonts (all you really need), but I couldn’t get the display to come through. I kept receiving the following error: Gtk–WARNING **: cannot open display”
I knew that I had ran Xming on another system connecting to this server before, so I knew that I had all the necessary files installed on the server. Then it hit me – I had to export the display. I must have done this directly from a SSH session before, not adding it to my profile. What I needed to add was the following:
if [[ -z $DISPLAY ]]; then
Then voila! Restart your session and you’re good to go.