Using GUI applications over SSH

Written by Robert -

There are usually multiple ways to achieve the same goal. In most cases I prefer to use a command line version instead of a GUI. It's faster and usually easy to use. There are cases, for example, installing a new virtual machine, where you want to use a graphical way to view the software. To do this, X11 must be installed on both the client and server. If this doesn't work, make sure "X11Forwarding yes" is set in the /etc/ssh/sshd_config file.

Linux:

ssh -X servername

Now you should be able to start graphical applications over an SSH server. This can be a bit laggy if it's over the internet, but it works.

Windows:

Windows takes a just a little bit longer to make sure it's working.

First of all, you are going to need the latest version of Xming. Install the application and enable X11 forwarding.

Now open Putty and go to Connection-> SSH ->X11. There you can select 'Enable X11 forwarding'

alt text

Log in to the Linux box and you can graphical software by using X11 forwarding.

alt text

Keep in mind that X11 only works under you used to log in with SSH. If you change username under your session (for example, su or sudo -i) you will lose the ability to run X11 software. It does work when using the normal sudo option.

Comments