Thomas Danckaert | 24 May 2012 19:08
Picon

using gnome-session DBus API

Hi,

I'd like to use the emacs dbus interface to make emacs-server prompt 
me to save all unsaved data (buffers) and then close itself when I 
try to logout from my gnome session.  i.e. I'd like to catch a signal 
announcing the logout, and, in case there is unsaved data, ask the 
sessionmanager to interrupt the logout procedure while the user is 
asked to save his data, and then give the sessionmanager permission 
to continue the logout procedure.

I believe the proper way to do it would be to implement the interface 
org.gnome.SessionManager.Client and subscribing to the messages of 
org.gnome.SessionManager.ClientPrivate?  If this is so, what is the 
sequence of messages to interact with the SessionManager?  I've found 
some documentation at

http://people.gnome.org/~mccann/gnome-session/docs/gnome-session.html#org.gnome.SessionManager.ClientPrivate 
, but I'm not sure if it's fully up to date.  There it is stated that 
the Client should not attempt to interact with the user when 
receiving QueryEndSession or EndSession signals.  So maybe there is 
another way to achieve what I want?

Thanks,

Thomas

Gmane