Variety should detect logout and clean up quotes and clock

Bug #1192184 reported by Peter Levi
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Variety
Confirmed
Medium
Peter Levi

Bug Description

We now properly handle SIGINT, SIGQUIT, SIGTERM and clean up.
However, this does not solve the issue with removing clock/quotes on session logout – it seems that in this case we don’t get any UNIX signals, we just get killed. The way to solve this seems to be to listen to DE-specific session-related events…

Some sample code here for PyGTK:
http://stackoverflow.com/questions/2490166/detect-user-logout-shutdown-in-python-gtk-under-linux-sigterm-hup-not-rece

Revision history for this message
Peter Levi (peterlevi) wrote :

https://developer.gnome.org/gtk3/3.3/GtkApplication.html#gtk-application-new

GtkApplication provides ways to inhibit the logout until we're done cleaning up. The question now is how to detect the user is actually logging out.

GEdit handles logout gracefully - we need to dig into its source.

Revision history for this message
Ivo Anjo (knuckles) wrote :

If I may add, I believe you can do operations on log-out by registering the app with a session manager (the register-session in GtkApplication).

After that you can get a signal, I believe quit-requested. The docs don't seem to mention that (...) but you can see it clearly in the patch that introduced it: https://mail.gnome.org/archives/commits-list/2012-January/msg03318.html .

Revision history for this message
Peter Levi (peterlevi) wrote :

"quit-requested" does not seem to be official API anymore: https://mail.gnome.org/archives/commits-list/2012-January/msg05551.html.
And same goes for "quit" signal: https://mail.gnome.org/archives/commits-list/2012-February/msg08022.html.
They don't mention what the replacement is.

Peter Levi (peterlevi)
Changed in variety:
importance: High → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.