Monday, April 23, 2007

Accessing remote X-window from windows box

This is not pretty, but it's needed sometimes. (Yeah, I know, your company made you use windows)

There is a good deal of information on this wiki page about Cygwin/X. But to me it seems like too much information so I simplified it for my own reference.

Here are three simple steps to access remote X after you get Cygwin with X installed:

  1. open a Cygwin window and start X server: X -multiwindow &
  2. export DISPLAY=127.0.0.1:0.0
  3. ssh -X username@remote.server
  4. run xclock (personally I prefer xeyes) to test
One thing to keep in mind is that the remote server has to enable X11 forwarding. It is configed in sshd config file /etc/ssh/sshd_config. Search for X11Forwarding.

That is it. If you prefer putty which is another nice tool I use occationally. You can do this:
  1. open a Cygwin window and start X server: X -multiwindow &
  2. Open putty, in Connection --> SSH --> X11 tab, check the box "Enable X11 Forwarding".
  3. Login and you are done, now open an X app like xclock or xeyes, you should see it.

No comments: