Ubuntu – X11 Forwarding over Gnu Screen, is it possible

command linegnu-screenssh

I use GNU Screen constantly. But, I've been trying to figure out if there is someway to get X11 apps to forward over screen when I am ssh-ing (Is that a word?). Currently if I try to run 'gedit' through screen, it opens on my 'server' computer and not on my client. If I do the same outside of screen, then everything is fine. But I want everything to be fine when I use screen too!

Thanks!

PS: I have googled the problem and I see mention of xmove, but I can't seem to find the package that contains xmove on my ubuntu. (ubuntu 10.10)

Best Answer

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.

Related Question