Problem: Run a program remotely, let the program continue to run even if your network connection goes down.
Solution: let Xpra manage a virtual X server, start your program as a client to that X server. Connect to Xpra to connect to the program.
Theory: programs are clients to a X server, which renders their windows on a "canvas". This "canvas" can be virtual, in which case it is only rendered at demand. When connecting remotely, you run a program that is a client to your local x-server, and this program (xpra) forwards the rendering commands from the remote (virtual) X server to the local (real) X server, which in the end renders the image.
xpra start :100 —start=xterm
xpra attach ssh://hansekbrand.se/
xpra stop ssh://hansekbrand.se/
"This command attaches to a running xpra server, and requests that it terminates immediately. This generally causes any applications using that server to terminate as well."