"Detach" and "Reattach" xterms across X sessions?

Solution 1:

I know this post is old but...

http://xpra.org/ Xpra is 'screen for X'

...Crazy how many people seemed to have answered without actually reading your question. Xpra will not only let you move applications from one display to another on any machine, it will allow you to totally shut disconnect the apps from any real display and then re-attach later.

Solution 2:

Not quite what you've asked for, but screen may do what you want.

This shares at the shell level rather than the X-window level, so you could have two xterms (on different Xservers, so long as they were on the same box), running screen -x, which would show the same sh sessions.

This wouldn't work for non-terminal things.

EDIT: xpra is probably what you want.

Solution 3:

You can use screen within an xterm. This is a program that allows you to attach and detach terminal sessions. So you would start an xterm, start screen within the xterm, and use the xterm as normal. To move the session, you would detach from the session within screen and exit the xterm. Start up another xterm somewhere else, and reattach to the existing screen session.

If you want to do it with any X program, you can use NX. It works like screen, in that you are able to detach/attach to a X server. It also understands the X11 protocol, so it does a good job at speeding up X over slow networks.