重新附加丢失进程的 X 服务器视图
我正在运行 Xorg,我的 (Qt) 程序会自行守护。 现在我注销并重新启动 X 服务器。 当我再次登录时,我的进程仍然运行良好,但我看不到它。
有没有办法将 X 服务器的新版本附加到旧进程? 如果我不重新启动整个服务器,而是注销并再次登录,有没有办法查看旧进程?
谢谢
I'm running Xorg and my (Qt) program daemonises itself. Now I log out and restart the X server. When I log in again my process is still running fine, but I can't see it.
Is there a way of attatching the new incarnation of the X server to the old process?
If I don't restart the whole server, but log out and in again, is there a way to look at the old process?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
xpra应该可以达到你的要求。 并且它还可以启动tcp连接(不需要ssh)。 在您的服务器上启动它:
在您的客户端上连接它:
您也可以使用 mac 或 windows xpra 应用程序来连接它。 我在win7和osx10.10.2上尝试过。 下载链接:
windows:https://www.xpra.org/dists/windows/Xpra_Setup .exe
Mac:https://www.xpra.org/dists/osx/x86/Xpra .dmg
xpra should achieve your requirement. And it can also start tcp connection (without need of ssh). Start it on the you server:
Connect it on your client:
You can also use mac or windows xpra app to connect it. I tried in on win7 and osx10.10.2. The download link:
windows: https://www.xpra.org/dists/windows/Xpra_Setup.exe
mac: https://www.xpra.org/dists/osx/x86/Xpra.dmg
与 X 服务器的连接丢失后,无法重新获得。
有一个名为 xmove 的 xserver 代理,但它已被相当弃用,并且不能与几个较新的 X 扩展一起使用,而现代工具包可能会使用这些扩展。
您可以尝试在另一个虚拟 X 服务器(例如 xvnc 或(更好的)NX)中运行您的进程。 NX是NoMachine开发的X代理技术。 NX 服务器也存在免费实现。
如果您在这样的服务器内运行程序,则可以在任意图形环境中附加和分离它。
After the connection to the X server is lost, it is not possible to regain it.
There was an xserver proxy called xmove, but it is quite deprecated and doesn't work with several newer X extension, which are likely used by modern toolkits.
You could try to run your process in another virtual X server like xvnc or (better) NX. NX is a X proxy technology developed by NoMachine. There exist free implementations of NX servers as well.
If you run your program inside such a server, it is possible to attach and detach from it from arbitrary graphical environments.
使用类似 Xpra 的东西:它允许您在离屏 X11 服务器上运行应用程序,您可以重新连接到该服务器每当需要时,也可以从远程机器进行。 它也支持“无缝”会话,因此窗口将像本地窗口一样显示。
实际示例:
xpra start :10 --start-child=/bin/YOURAPP
然后每当您想要重新连接时(例如在 X11 服务器重新启动后):
xpra Attach :10
code>或者从远程计算机:
xpra Attach ssh://THESERVERHOSTNAMEORIP/10
Use something like Xpra: it allows you to run applications on an off-screen X11 server to which you can re-attach whenever needed, and from remote machines too. It supports "seamless" sessions too so the windows will appear just like local windows.
Practical example:
xpra start :10 --start-child=/bin/YOURAPP
Then whenever you want to re-attach (say after an X11 server restart):
xpra attach :10
Or from a remote machine:
xpra attach ssh://THESERVERHOSTNAMEORIP/10