Skip to content

Remote Display

marksvc edited this page Jun 18, 2021 · 1 revision

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

Table of Contents

Xephyr

Installation

In Debian, type

 $ sudo apt-get install xserver-xephyr

Usage

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

Clone this wiki locally