[SATLUG] Attaching to a running GUI

Geoff geoff at w5omr.shacknet.nu
Fri Feb 8 13:34:47 CST 2008

Kase Saylor wrote:
> Is there a way to SSH to a box that is running a GUI and "attach" to=20
> that GUI so that is can be seen on the remote machine?

that'd be like going RDP into a windows box, that's already open, right?

You'd have to be -the- user that's logged in, I'd think. And then,=20
there's only one instance of that user at a time.

If the ForwardX11 variable is set to "yes"=9D (or see the description of =

the -X, -x, and -Y options above) and the user is
using X11 (the DISPLAY environment variable is set), the connection to=20
the X11 display is automatically forwarded to the
remote side in such a way that any X11 programs started from the shell=20
(or command) will go through the encrypted channel,
and the connection to the real X server will be made from the local=20
machine. The user should not manually set DISPLAY.
Forwarding of X11 connections can be configured on the command line or=20
in configuration files.

The DISPLAY value set by ssh will point to the server machine, but with=20
a display number greater than zero. This is nor=E2=80=90
mal, and happens because ssh creates a "proxy"=9D X server on the server =

machine for forwarding the connections over the
encrypted channel.

ssh will also automatically set up Xauthority data on the server=20
machine. For this purpose, it will generate a random
authorization cookie, store it in Xauthority on the server, and verify=20
that any forwarded connections carry this cookie and
replace it by the real cookie when the connection is opened. The real=20
authentication cookie is never sent to the server
machine (and no cookies are sent in the plain).

If the ForwardAgent variable is set to "yes"=9D (or see the description o=
the -A and -a options above) and the user is using
an authentication agent, the connection to the agent is automatically=20
forwarded to the remote side.

More information about the SATLUG mailing list