[x11] Application persistency even when DISPLAY connection is lost
Carsten Haitzler (The Rasterman)
raster at rasterman.com
Fri Mar 2 18:37:58 PST 2007
On Fri, 02 Mar 2007 16:48:23 -0800 John Klingler <john at jupiter.com> babbled:
> 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.
actuallt that's incorrect. that is only the DEFAULT behavior. you can set an
xlib io handler that will stop this from happening and then re-establish the
connection. no need for a parent process, shared memory etc.
the problem is - the APP has to do this. xlib will not, as you will have now
lost all server-side and connection state.
what you want is something like vnc. run vmware and display on the vnc server -
then connect to the vncserver from anywhere with vncviewer whenever you like.
> 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
> >
>
--
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler) raster at rasterman.com
裸好多
Tokyo, Japan (東京 日本)
More information about the xorg
mailing list