Normally with X, it's easy to run an application on a remote computer just by using X forwarding:
local:~$ ssh -X host host:~$ echo $DISPLAY localhost:20.0 host:~$ xterm
xterm will appear on your local computer.
But if you want to continue working with that application on a different remote computer (or once you are physically in front of the computer it is running on), then you're out of luck.
For an application running in the terminal, you can start it inside
a GNU Screen (or
tmux) session which you can
detach and then attach to again on another
GNU Screen for X
X Persistent Remote Applications) lets you
move graphical applications from one computer to another in addition
to fixing other problems with X forwarding.
If you instead use
xpra for the forwarding, then you can detach
and reattach to the session at will.
For the initial setup, do
local:~$ ssh host host:~$ xpra start :30 Entering daemon mode; any further errors will be reported to: /homes/gws/perelman/.xpra/:31.log host:~$ DISPLAY=:30 screen -S xpra-test host:~$ xterm
Then on the computer you actually want to interact with the graphical application on:
local:~$ xpra attach ssh/host/30
xterm should appear, along with any other graphical applications
you run in the
To detach, either run
local:~$ xpra detach ssh/host/30
or simply attach on a new host and the first host will be automatically detached.
Really any high numbered display should be fine. As
man page notes, lower numbers are used by local X sessions
ssh forwarding, so starting at
:30 or higher just gets out
of their way. Unfortunately, unlike
xpra can't just
use any names it wants because X programs expect to be given a display
Not just graphics
The primary advantage of using X forwarding or
xpra instead of
VNC is that you get separate windows and features like copy and
paste and drag and drop work. In general, applications act just like
they are running on your local machine.
xpra supports forwarding sound using
PulseAudio, although I haven't gotten it to work yet.
NX also supports detaching and re-attaching sessions, although
its original design goal was making X work better over poor network
xpra also has some features for). NX has some
licensing issues; the recent official versions are closed, but there are
open-source forks of the older versions that are maintained.
xmove is a predecessor to
xpra that stopped
development in 1997.