Remote X sessions

From ourproject.org wiki
Jump to: navigation, search


[[../Hints_and_Tips|Back to Hints & Tips]]

Setting up a remote X session

A couple of definitions:

Host computer: The main computer where the user is working from.

Remote computer: The machine running the application that is to be displayed on the Host.

Host IP address: 192.168.0.7

remote IP address: 192.168.0.12

One assumption: The login name on both machines is bdi4emc


Assuming sshd is running on the remote computer (default for a standard BDI-4 install), log in as root and put this line in /etc/ssh/sshd_config:

X11Fowarding yes

Restart sshd on the remote computer with:

sudo /etc/init.d/ssh restart


From the host computer, use the following command from a konsole or xterm to log in:

ssh -X -l bdi4emc 192.168.0.12

Password:

Check that X forwarding is working with:

echo $DISPLAY

localhost:11:0

If a blank line is returned, it is likely ssh was not restarted. A simple test to confirm X forwarding is working is to try:

xterm

Alternatively, the remote application can be launched by combining the environment variable DISPLAY with the application name in a single line. In a fresh konsole or xterm on the host computer, try:

ssh -X -l bdi4emc 192.168.0.12 "DISPLAY=192.168.0.7:0.0 xterm"


[[../Hints_and_Tips|Back to Hints & Tips]]

[wiki:Self:projects/bdi4emc Home]