Running Remote X Applications

This HowTo will demonstrate how you can run a program on one computer but have it display on another. For this example we’ll assume you have a server with an IP address of “192.168.0.1″ and a desktop computer with an IP address of “192.168.0.2″. You want to run an application on the server but have it display on the desktop computer. Let’s get started:

You need to permit the server to connect to your desktop computer’s display. Note that the TCP port used is “6000″. From your desktop computer:

xhost + 192.168.0.1

Still from your desktop computer:

ssh -X -l MyUserName 192.168.0.1

In the above command sample, you see the “-X” option. This is used to set the display variable on the server. You can leave out the “-X” option and run the following command, the choice is yours:

export DISPLAY=192.168.0.2:0.0

Now you are on the server via SSH. Run the following to install a basic X application. Skip this if you have already got the application installed that you want to use. if not, consider changing the “xcalc” to be the application that you need installed:

apt-get install xcalc

Now run the application:

xcalc&

You will see the xcalc application display on your desktop computer. Note that it only has access to the servers file-system (and NFC, etc), not your desktop computers file-system.

Thanks to AGIX Linux

Leave a Reply

Your email address will not be published.

*