[x11] Application persistency even when DISPLAY connection is lost
Barton C Massey
bart at cs.pdx.edu
Sat Mar 3 00:07:12 PST 2007
In message <45E8C5D7.6000804 at jupiter.com> you wrote:
> Unfortunately, Xlib exits when a display connection is broken.
> In order to restore an application that has exited when the
> connection can be re-established, it is necessary to have a
> parent process without a display connection to detect when the
> application has exited and restart it. I call this a "heartbeat
> monitor" and have implemented these on commercial applications.
> It does not stop there. In order to recover the application's
> previous state, it is necessary to keep that in memory that
> will persist after the application has exited. Shared memory
> is ideal for this purpose. This requires the application to
> have been coded for this eventuality.
> To summarize, if you are writing the application it is indeed
> possible to do what you want, otherwise you probably cannot.
If you are writing disconnectable applications, be aware
that, unlike Xlib, XCB is very graceful about connection
termination; it will report sensible errors instead of
killing your app :-). Hopefully we'll get some toolkits
ported to XCB soon, and can start to work on things like
More information about the xorg