Difference between revisions of "Remote Display"

From LSDevLinux
Jump to: navigation, search
(Method 2: Pointed out Method 2's slowerness and using more bandwidth.)
Line 28: Line 28:
==See also==
==See also==
* [http://etbe.coker.com.au/2007/01/07/xephyr/]
* [http://etbe.coker.com.au/2007/01/07/xephyr/]
[[Category:Linux tools]]

Latest revision as of 12:05, 14 February 2008

One can display remote graphical applications on their local screen using vnc, NX, Xephyr, or just ssh -X.



In Debian, type

$ sudo apt-get install xserver-xephyr


Method 1

To run Xephyr on your local machine and receive remote X client connections to your local Xephyr window, do the following.

local-machine:$ (echo -n "add :1 . "; mcookie) | xauth
local-machine:$ Xephyr :1 -reset -terminate &
local-machine:$ DISPLAY=:1 ssh -Y username@remotemachine gnome-session

Method 2

To run Xephyr on the remote machine and forward the Xephyr window to your local machine, do the following.

local-machine:$ ssh -X username@remotemachine
remotemachine:$ (echo -n "add :1 . "; mcookie) | xauth
remotemachine:$ Xephyr :1 -reset -terminate &
remotemachine:$ export DISPLAY=:1
remotemachine:$ gnome-session

Or simply

ssh -X username@remotemachine "(echo -n 'add :1 . '; mcookie) | xauth; Xephyr :1 -reset -terminate & DISPLAY=:1 gnome-session"

Unfortunately, this requires you to trust the user account on the remote machine (because it can start other programs to interact with your local X session, and could do keylogging).

This method also seems slower to update the screen and uses much more (more than twice as much?) bandwidth than Method 1.

See also