Running a GUI application on an other computer

There are two ways the more complicated remote desktop way where the complete screen of a computer is transmitted ore the more native UNIX/Linux way to just use X forwarding having the application running on one computer and having its Gui window appearing on an other computer.

X11 forwarding

X forwarding is explained here. This is quite simple since it works as when working with a remote console. ssh is used, but to have it supporting X on the remote computer /etc/ssh/sshd_config must have

X11Forwarding yes

To take this in affect /etc/init.d/sshd reload

A hurdle is that the remote PC does not know where to display the GUI. This is the case when echo $DISPLAY on the local PC connecting to the remote PC does not show anything. This can be fixed by running export DISPLAY='' on the remote machine with the IP address of the local machine. Or export DISPLAY=localhost:10.0 in a console of the local machine being connected to the remote machine. The DISPLAY variable will then hold the IP address of the local machine.

If the DISPLAY variable is setup correctly then commands as ssh -X mozart /usr/bin/leafpad can be entered on a console window of the local machine and then a GUI window poop up in the local machine.

Linurs Servernest startpage