1

I started a process with GUI from the command line in a remote computer using ssh -X. Knowing it would take a long time to run it, I left it in the background and disowned.

As I feared, I had connection problems before it ended and got a broken pipe. After I was able to reconnect, I used reptyr to recover ownership of the process. So far, so good. But is there any way I can reopen its GUI now that I own the process again?

1

That's probably not possible. When the process loses the connection with the X server, it normally cleans up all of its internal data associated with the GUI. It doesn't have to, but that requires significant effort on the part of the programmer (they would have to work around the standard libraries). Most programs don't offer an option to open a new GUI window if the existing one has been closed, either.

If you fear that your connection is unstable, you can use xpra as a proxy between the application and the X server. Xpra creates a layer of insulation between the application and the server that allows the application to move from one server to another; it does for GUI applications what Screen does for text mode applications. Xpra has to be used when starting the application however; afterwards it's too late.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.