LinuxReviws.org --get your your Linux knowledge
> Linux Reviews > Tips and Tricks >

Running programs on a remote X screen

X has great built-in screen management. It allows you to run programs anywhere and view them anywhere else

The client where you will be displaying the program(s) running on the remote server most allow the server to use your local display for displaying the application.

Run xhost on the client:

xhost 192.168.0.20

(replace 192.168.0.20 with your application servers IP).

You can now login to you server and direcly start a program. You must use the DISPLAY= variable to tell what display you want the application started. This should be the clients IP and screen number (0.0 if you only have one monitor).

Examples:

  1. ssh you192.168.0.20 DISPLAY=192.168.0.40:0.0 aterm
  2. ssh other192.168.0.20 DISPLAY=192.168.0.50:0.0 mozilla
  3. ssh screenking@multimonitor.org DISPLAY=192.168.0.98:0.3 firefox

Meet new people