PDA

View Full Version : Get notified when hibernate / suspend / switch user/ resume



noa l
14th December 2010, 12:36
Hi

I'm newbi to Linux world, so please bare with me :-)

I'm writing a QT application .. I'm looking for a way to get notified when user is switched, when a session is suspened or going hibernate, and whe nsession is resumed (also "unlocked")

any help would be aprreciated - please if you can with examples as i 'm not that familiar with all kind of cocepts.

The solution should match both gnome and KDE environments.

Thank you all in advance

Noa

wysota
14th December 2010, 12:45
There is probably some dbus interface responsible for sending such notifications. I don't know if it is cross-desktop or do KDE and Gnome have their own.

noa l
15th December 2010, 08:06
thanks wysota

I already tried to figure out the DBus interface. However - I didn't find the info i need (or maybe i did but didn't know how to acheive it) - so if anyone can share info about it with me I would appreciate it ..