X11 applications over SSH


An easy way to run your Linux X applications on your Windows desktop is to use the SSH X11Forwarding capability. If you enable X11Forwarding on the SSH server you will be able to display GUI applications, running on the server, on your Windows desktop. Edit /etc/ssh/sshd_config and change the line X11Forwarding no into:

X11Forwarding yes

On your Windows desktop you should have an ssh-client and a X-server. A good choice to install on your Windows machine would be CYGWIN. (http://www.cygwin.com) Download setup.exe and follow the setup instructions. To be able to use X11 over SSH you need to select openssh from the NET group, and xorg-server, xterm and X-start-menu-icons from the X11 group. After finishing the installation start the X-server on your windows machine. In the CYGWIN shell type:

export DISPLAY=:0.0
followed by
ssh -X yourusername @linuxserver.yourdomain.com
Now you can display your X applications on your Windows desktop. For example type
and the clock will be displayed on your desktop.


You are here: Home Howtos and FAQs General X11 applications over SSH