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: GtkWARNING **: 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
export DISPLAY=:0.0

Then voila! Restart your session and you’re good to go.

Categories: Linux

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.