Move a window to another computer

networkingwindowwindow-managementx11

Suppose I have a few machines, all connected to a monitor and all running linux. I want to be able do the following: Start an application on computer A and then move its window to computer B if necessary. Once the application window was moved it B should be able to use it like any other window (Similar to ssh-forwarding). Now A and B should be able to put the window back to A.

I found xpra, but I don't think this is what I need. It lets me open remote windows, but AFAIK I can't move my windows between computers.

Is there any tool out there that can do what I want? The world of X-programs is big, so there should be something.

Best Answer

As Dave says, xpra is ideal for this. You need to start an xpra session on the system where your application will be run (not displayed):

xpra start :20

(20 must be a free X display number — I usually start at 20, that leaves room for multiple local X servers and incoming forwarded X sessions using SSH.)

Then you start your application on display 20:

DISPLAY=:20 myapp &

To display your application, you attach to it with xpra:

xpra attach :20

You can do this over SSH too:

xpra ssh:user@host:20

You can run multiple applications in one xpra session. xpra offers tons of possibilities, including forwarding PulseAudio, sharing the clipboard, forwarding files...

By default, attaching from one machine detaches the session from any others, so you don't need to remember to detach.

Related Question