Ask Your Question

screen lock detection in c++/shell

asked 2014-10-30 05:08:10 -0500

wardex gravatar image

updated 2015-03-28 10:30:54 -0500


I have a cross-platform application that runs on Fedora 20 (GNOME). There I need to determine if the screensaver is active or not and if the screen is locked or not.

I found out that I can get the screensaver info with: "gnome-screensaver-command -q"

But I cannot seem to figure out how I can detect a screen lock. For example on Ubuntu I can use this: gdbus call -e -d com.canonical.Unity -o /com/canonical/Unity/Session -m com.canonical.Unity.Session.IsLocked But that's a Unity specific item. So any ideas on how to get this info on Fedora (GNOME) machines?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-10-30 06:19:18 -0500

FranciscoD_ gravatar image

We'll probably need a gnome-shell developer to answer this. The lock is part of the shell I think.

edit flag offensive delete link more


Where do I have most chanse of finding one?

wardex gravatar imagewardex ( 2014-10-31 08:23:08 -0500 )edit
FranciscoD_ gravatar imageFranciscoD_ ( 2014-11-01 06:14:06 -0500 )edit

Question Tools

1 follower


Asked: 2014-10-30 05:08:10 -0500

Seen: 113 times

Last updated: Oct 30 '14