Launch remote GUI locally trough SSH

There are times when it is easier to change a setting through a GUI rather than the command line. You can launch a remote GUI application on your local machine through SSH.

Both machines need to be Linux with a desktop environment installed. I have tested this with two Ubuntu 10.04 systems.

Basic X11 forwarding

Adding the -X parameter to SSH enables X11 forwarding:

ssh -X user@remote-server

Once connected, any GUI application you launch from the terminal displays on your local machine:

gedit /etc/remote-config-file.conf

Trusted X11 forwarding (-Y)

Some applications need more X11 permissions than -X provides. Use -Y for trusted forwarding:

ssh -Y user@remote-server

Making it permanent with ~/.ssh/config

Host my-server
    HostName 192.168.1.100
    User myuser
    ForwardX11 yes

Enjoy!

One thought on “Launch remote GUI locally trough SSH”

Leave a Reply

Your email address will not be published. Required fields are marked *