Attach/Detach to a remote instance of Eclipse
Asked Answered
V

2

7

When using Eclipse over X-Windows on a remote shell (X port forwarding), is there a way to simply detach my X connection and come back to the process later. For a little more clarity, I'm on a Windows machine and have to reboot. I'd like to keep Eclipse running and come back where I left off. Eclipse is running on my Windows machine through an X-Server connected to a Linux box.

I'm thinking something like tmux could do the trick. However, I do a Ctrl-Z to stop Eclipse and it won't close the Eclipse Window. If I restart the X-Server in Windows, Eclipse fails when I try fg 1. Any other options?

Vicarial answered 8/3, 2010 at 20:6 Comment(0)
I
3

I have zero experience with it, but xpra sounds like exactly what you're looking for.

Insomnia answered 8/3, 2010 at 20:16 Comment(2)
That was the hint that I needed. Xpra works great if you know how to use it.Vicarial
the version in the link has not been updated in years, try this fork insteadBataan
V
4

Xpra did everything that I needed, but it was not clear exactly how it worked. I was able to get it working by opening two PuTTY sessions in windows, one server and one client. Also, the Google Code is out-dated. Instead, install from http://xpra.devloop.org.uk/dists/xpra-0.0.7.9.tar.bz2. I'm not sure how it's different, but it worked for me. The README tells how to build the package. It is necessary to apt-get a bunch of other stuff. But, here are the missing pieces on how to get it work as I describe above:

Setup server:

cd ~/download/xpra/xpra-0.0.7.9
export PYTHONPATH=$PWD/install/lib/python:$PYTHONPATH
./install/bin/xpra start :10
export DISPLAY=:10
xterm&

Setup client:

cd ~/download/xpra/xpra-0.0.7.9
export PYTHONPATH=$PWD/install/lib/python:$PYTHONPATH
./install/bin/xpra attach :10

Notes:

  • The Windows xpra installer is not needed for this configuration. I don't know what it's supposed to do.
  • Be sure to run Xming on Windows.
  • Be sure to enable X port forwarding on the client PuTTY window.
  • Launch whatever you want from the xterm window. (ie Eclipse)
  • You can close the server window once xterm is up.
  • Hit ctrl-c in the client window to detach from the session.
  • Do all the client commands again to re-attach..even after restarting PuTTY, the Xming, or Windows itself.
Vicarial answered 9/3, 2010 at 13:45 Comment(1)
Unless your windows installation has all the required bits (python/gtk/pygtk/python-imaging/... cygwin, and many other bits) this will not work. That is why there is a Windows installer which includes everything that you need. You do not need Xming at all unless you use a cygwin type of environment: modern versions of pygtk on MS Windows run natively.Bataan
I
3

I have zero experience with it, but xpra sounds like exactly what you're looking for.

Insomnia answered 8/3, 2010 at 20:16 Comment(2)
That was the hint that I needed. Xpra works great if you know how to use it.Vicarial
the version in the link has not been updated in years, try this fork insteadBataan

© 2022 - 2024 — McMap. All rights reserved.