24

I want to connect to a Linux server from my Windows 7 desktop. I can successfully ssh in, but I want the equivalent of "ssh -X", so that I can open GUI programs and actually see them.

3 Answers 3

17

You can enable X11 Forwarding in Putty's configuration. In the menu on the left, find the Connection tree. In SSH, expand it and you will see Tunnels window. Click "Enable X11 forwarding". It is setting the default to X display at "localhost:0".

Of course, the server you are connecting to also needs to be properly configured.

Hope this helps and good luck.

1
  • 6
    Of course, you also need an X11 server running on the computer with putty, so the remote programs have a way to display their GUIs.
    – Ben Voigt
    Jun 19, 2011 at 1:58
13

you will need a xserver like xming running as well.

Personally i just tend to use mobaxterm and ssh-x in that cause its a fair bit simpler

1
  1. Install a Xserver. Your free options are Xming, XSRV and Cygwin/X. Personally I use the free version of Xming, because I primarily work in the command line, and my needs for intensive graphics is not too much, and I know Xming works. The version of Xming I use is from 2007, and while Xming is still being actively developed, the latest version 7.7 is no longer available without paying a donation to the author. XSRV and Cygwin/X is more well maintained, but I havent used it.

  2. In Putty, under SSH>X11, you need to make sure that you "Enable X forwarding" and set the display to the server "X display location := localhost:0". You can also check that everything is working by doing "echo $DISPLAY" once you log in through SSH. If the graphics is being forward correctly to the Xserver, then it should read the variable DISPLAY should have the value :10 or :0. The values can vary somewhat, depending on how many X sessions you have running: https://unix.stackexchange.com/questions/10121/open-a-window-on-a-remote-x-display-why-cannot-open-display

  3. Try the program "xeyes" or "xclock", which will display a GUI, for testing purposes.

You must log in to answer this question.