If I ssh into a machine, I can run graphical applications if I enable X11 forwarding – I run gedit
from the command line, and gedit pops up as a window. My question is this: Is there a way to make a window pop up for applications that are already running?
Example: Suppose I have two machines, A and B. I open gedit on A, and type some text
and leave. Then I ssh into A from B. If I run gedit
I'll just spawn another process. Can I access the gedit process that's already running (with some text
)? Or is this a job for vnc?
Best Answer
Not really a solution to literal "grabbing windows of programs already running", but still…
Use
xpra
.It has to be installed, configured and started beforehand, just like
screen
ortmux
for console applications. You have to run your program viaxpra
in the first place, then you can do the magic of (re)connecting from different machines.xpra
is available asxpra
package at least in Debian and Ubuntu. I have used it few times. The performance was better than for plain X forwarding.Examples are here. The following are from
man xpra
on my Kubuntu:You run the above examples on your A. Then you can attach directly from A:
or from your B: