Transfer X from monitor to remote machine

I want to remote login to another laptop to continue working on session left over. VNC is slow because it’s bandwith hog. I know (or I think I know) that it’s not latency, it’s bandwith because the first update from the top of screen or the top of recently changed view occurs very fast, but the entire redraw takes time.
I believe that X doesn’t send the pixelmap, but instructions on how to redraw screen. So I’d like to use X.

Question: Is there a way for me to say, to all the applications, please now migrate to the X server available remotely? Or can I make my computer think that what it calls :0.0 is no longer attached to the monitor, but is now on a remote machine. (And can I reverse this process so that I can switch back to the other laptop whenever I want)?

Asked By: 0fnt


There isn’t a way to do that as part of X itself, but there is the screen for X” tool xpra. Xpra:

allows you to run X11 programs, usually on a remote host, direct their display to your local machine, and then to disconnect from these programs and reconnect from the same or another machine, without losing any state.

It works quite well and with no additional bandwidth use against a regular X connection. It’s capable of “shadowing” a desktop, in essence copying all the clients over to a remote machine. Depending on your usage pattern you might prefer just pointing applications at the xpra server directly, and then connecting to it from that machine when you’re on it.

Some applications do rely on being on the same physical machine as the client in various ways, and those may misbehave. Direct rendering is the most common issue that comes up there – GL and hardware-accelerated video probably won’t perform as well or may break entirely.

Answered By: Michael Homer
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.