linux - How to check if screen saver is running? -
i have script written in bash, need take different route in case screensaver running. linux xorg , kde. script called cron, , connects display=:0.
any hint/idea how check state of screensaver?
if kde4 running, can use dbus check if screen saver running:
$ qdbus org.freedesktop.screensaver /screensaver org.freedesktop.screensaver.getactive
or
$ qdbus org.kde.screensaver /screensaver org.freedesktop.screensaver.getactive
this works gnome, known not following freedesktop standards, have use:
$ qdbus org.gnome.screensaver /screensaver org.gnome.screensaver.getactive
last not least, can check whether standard x screen server running using xscreensaverqueryinfo() , checking state field.
Comments
Post a Comment