views:

146

answers:

4

Hello. 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

+2  A: 

probably your best bet is to separate the application into 2 parts. One would be a GUI-less daemon, the other would be a this GUI client which using DBUS or some other API to communicate with the daemon.

Evan Teran
A: 

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.

ypnos
A: 

These guys say that it is possible, I have not tested that functionality...

Check it out !

Malkocoglu
Itt's the same as the solutions I wrote about -- start the application within a virtual X server.
ypnos
A: 

Wow, this is my first question on the site and already I'm impressed.

Thanks a lot, guys!