X11 Forwarding over Gnu Screen, is it possible?

To manually do this, once you have SSHed in, but before you reattach to screen, check your DISPLAY environment variable:

echo $DISPLAY

Once you have re-attached to screen, explicitly set the environment variable:

export DISPLAY=:N.0

where :N.0 is what the echo showed before the attach. This won't be perfect, since some application may be expecting to talk to the Session D-Bus, which is a bit more complex to send over the SSH connection.


there's a program called xpra in the repositories, it's like gnu screen for x11. it's not too hard to work with:

X Persistent Remote Applications

Xpra gives you the functionality of GNU Screen for X applications.

It allows the user to view remote X applications on their local machine, and disconnect and reconnect from the remote machine without losing the state of the running applications.


Byobu automatically reattaches ssh and gpg agents. I could make it reattach the display variable to, if that's helpful to you...