连接/分离到 Eclipse 的远程实例

发布于 2024-08-24 07:08:49 字数 406 浏览 2 评论 0原文

当在远程 shell 上通过 X-Windows 使用 Eclipse(X 端口转发)时,有没有一种方法可以简单地分离我的 X 连接并稍后返回该过程。为了更清楚起见,我使用的是 Windows 计算机,并且必须重新启动。我想让 Eclipse 保持运行并返回到我离开的地方。 Eclipse 通过连接到 Linux 机器的 X-Server 在我的 Windows 机器上运行。

我认为像 tmux 这样的东西可以解决这个问题。但是,我执行 Ctrl-Z 来停止 Eclipse,但它不会关闭 Eclipse 窗口。如果我在 Windows 中重新启动 X-Server,当我尝试 fg 1 时,Eclipse 将失败。还有其他选择吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

拒绝两难 2024-08-31 07:08:49

Xpra 做了我需要的一切,但不清楚它到底是如何工作的。我可以通过在 Windows 中打开两个 PuTTY 会话(一台服务器和一台客户端)来使其工作。此外,Google 代码已经过时了。相反,请从 http://xpra.devloop.org 安装。 uk/dists/xpra-0.0.7.9.tar.bz2。我不确定它有什么不同,但它对我有用。自述文件讲述了如何构建该包。有必要 apt-get 一些其他的东西。但是,以下是有关如何使其正常工作的缺失部分,如我上面所述:

安装服务器:

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

安装客户端:

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

注意:

  • 此配置不需要 Windows xpra 安装程序。我不知道它应该做什么。
  • 确保在 Windows 上运行 Xming。
  • 请务必在客户端 PuTTY 窗口上启用 X 端口转发。
  • 从 xterm 窗口启动您想要的任何内容。 (即 Eclipse)
  • 一旦 xterm 启动,您就可以关闭服务器窗口。
  • 在客户端窗口中按 ctrl-c 以脱离会话。
  • 即使重新启动 PuTTY、Xming 或 Windows 本身后,再次执行所有客户端命令以重新连接。

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.
断肠人 2024-08-31 07:08:49

我对此的经验为零,但 xpra 听起来正是你的意思寻找。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文