Xming is an X server for Windows. With it one can run linux applications on a remote linux box with the X user interface windows appearing on ones Windows desktop:
Internet Explorer, xeyes and xterm in perfect harmony.
How to do this wonderous thing?
- install xming
-
run xlaunch to fire up xming as your windows X server (should be added to quick launch), selecting the following options:
- Multiple Windows (each app gets its own windows window)
- Display Number 0
- Start no Client (client is the program that runs)
- No Access Control (I'm a trusting soul)
- you now have an X server on your windows box as display :0. An X server is something that displays the user interface for X client programs (X keeps you on your toes by using counter-intuitive terminology).
- open putty at the configuration of your favourite linux box.
- enable the X forwarding option: the 127.0.0.1:0 means remote X clients will display on your new windows X server (:0) running on your pc (127.0.0.1)
- open the ssh connection in putty and enter a command such as xterm. Amazingly, an xterm window should open on your local pc! It's wonderous, xterm is running on the remote pc but the user interface is on your windows box.
Interestingly, the ssh session you open has a DISPLAY environment variable open that tells the X clients you launch from it where to stick their displays.
peter@server:~$ echo $DISPLAY localhost:10.0 peter@server:~$
Through the miracle of ssh this is routed back to xming on the Windows box.
Now, how about if beyond your gateway ssh server is another ssh server and you want to run your X client applications on that? The answer is amazingly simple. Open the session on the gateway server as described above and then use the command:
ssh -X name-of-other-server
you now have a command prompt on the remote remote server and if you now run
xterm
then again you get a xterm display coming up on your local windows pc but this time from the remote^2 box.
UPDATE: troubleshooting
-
may need this in /etc/ssh/sshd_config
X11UseLocalhost yes
-
may need to
sudo apt-get install xauth
I needed this on a previously x-less box where I had installed gitk to do some git study on a headless server box



