session-manager fails to recognize inhibitor



Hi list,

when GNOME applications have unsaved data and the user wants to shutdown, the session manager (?) informs the user about this on the lightbox-popup with the choices "cancel, restart, shutdown". I believe that this is done via dbus (http://www.lucidelectricdreams.com/2011/06/disabling-screensaverlock-screen-on.html) and I can successfully register an inhibitor using the python example given there. I'd like to use this mechanism for my console backup application, so I don't shut down my laptop when a backup is running.

My problem is that the inhibition and the "reason" are not shown during log out on GNOME 3.4 (Debian stable 32bit). Why is that?

I downloaded the gedit source to check how gedit handles this, but it uses a GTK+ call:
https://developer.gnome.org/gtk3/stable/GtkApplication.html#gtk-application-inhibit

Can anyone give me an idea how I can inhibit shutdown using dbus (I know that this isn't 100% sure as users could override it)?

Regards
jan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]