[pygtk] X server exiting how to catch
Gian Mario Tagliaretti
g.tagliaretti at gmail.com
Thu Nov 9 20:51:41 WST 2006
2006/11/9, Mike Bernson <mike a mlb.org>:
> I am trying to trap 2 condition
>
> 1 When the xserver dies (connection lost)
> Is there any way to trap this condition from python ?
> I have a number of task that are running I want them to die
> when the xserver dies and the application see it. There is also
> some cleanup I would like to do.
You could maybe get the current gtk.gdk.Display and connect the
"close" signal which will return true if the connection is lost due to
an error.
Maybe you can also have a look at OSD-Gnome, Gustavo could have done
some similar black magic in there :)
cheers
--
Gian Mario Tagliaretti
http://www.parafernalia.org/pygtk/
More information about the pygtk
mailing list