Brian J. Tarricone
brian at tarricone.org
Thu Dec 3 23:24:46 CET 2009
On Thu, Dec 3, 2009 at 14:16, David Jagoe <david.jagoe at pragmagility.com> wrote:
> I have written a PyGTK application that only runs on Xfce. It seems that the best way of implementing session management (actually I just want to clean up application resources on logout) is to use libexo. I see that python-exo is no longer maintained, so could anyone recommended a way of doing this in a PyGTK application? Is compiling python-exo the best way to go, or should I think about wrapping just a small part of libexo for use in Python? Or am I missing an easier way of doing this?
That depends on what you mean by "session management". If all you
care about is making sure your app gets started when the user logs in,
just drop a .desktop file in the appropriate autostart directory.
If you're looking for a way to maintain application state across
restarts, there are various ways of doing this, one of them being
using X11 SM. You can also periodically checkpoint your app's state
and just restart in the last saved state if the app is restarted for
any reason. It's a bit less clean than using SM, but should work.
I don't think the exo python bindings are maintained, so you might be
on your own with them. You might try looking for another X11R6-SM
client implemented in (or wrapped by) python; anything that speaks
X11R6 SM should work with xfce4-session.
More information about the Xfce4-dev