[x11] Application persistency even when DISPLAY connection is lost

John Klingler john at jupiter.com
Fri Mar 2 16:48:23 PST 2007


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 implementing your own remote application, be very
careful to clean up shared memory that you allocate for the
very reason that it is persistent. You will also have to use
a synchronization IPC such as semaphores to maintain consistency
of the state unless you enforce a single instance of your
application to be running at any one time.

Good luck, in any case,

John

root66 wrote:

> Hi,
>
> A friend of mine asked me this:
>
> Is it possible to run a remote X11 app., have its DISPLAY locally,
> have the app. continue when the local machine goes down, and when
> the local machine comes up again, have the output being displayed
> locally again.  All without interruption of said app.
>
> The app. he wanted to do this for was Vmware running a MS product
> on a Linux host.  Local machine is Linux also.
>
>
> - B.
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20070302/aeba0376/attachment.html>


More information about the xorg mailing list