简体   繁体   中英

Is it possible to get notified when the screensaver starts or stops under linux

I want to get notified when the screensaver (probably xscreensaver) starts or stops. Is there any solution with gtk, glib, gio or other library that will do that for me under linux?

Take a look at the ActiveChanged signal in org.freedesktop.ScreenSaver D-Bus interface. It's supported by current GNOME and KDE at least (if you want to support older GNOME releases you may have to keep an eye on org.gnome.ScreenSaver as well).

Unfortunately the spec seems to have disappeared -- or it was ever in email form. Take a look with d-feet or something to see the actually available API (it's not too complex).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM