I wonder on which version of Unity is that supposed to work. Maybe it works on Utopic, but it doesn't work on Trusty:
$ gdbus call --session --dest com.canonical.Unity --object-path /com/canonical/Unity/Session --method com.canonical.Unity.Session.IsLocked Error: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such method 'IsLocked' Is there any alternative for Trusty? I understand the fact that it's not the same thing to have the screen locked than to have the screen in blacked out. However, there have been plenty of programs or applets written in the past that check whether the screensaver is active or not by checking this method and this is how it worked with Unity in Precise. This basically breaks anything that used those checks, requiring changes specific for Unity, while gnome- screensaver keeps behaving the same way. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to unity in Ubuntu. https://bugs.launchpad.net/bugs/1342152 Title: GetActive method for the screensaver reports False even when screensaver is active Status in Unity: Won't Fix Status in “unity” package in Ubuntu: Won't Fix Bug description: Hi! unity version: 7.2.1+14.04.20140513-0ubuntu2 (Trusty) I have an application that checks the state of the screen saver via dbus. Unity implements an interface for using org.gnome.ScreenSaver, so as far as I can see, this should work (Python example): import dbus session_bus = dbus.SessionBus() session_manager = session_bus.get_object('org.gnome.ScreenSaver', '/org/gnome/ScreenSaver') session_manager.GetActive(dbus_interface='org.gnome.ScreenSaver') This correctly returns False when the screensaver is not active, however, when I lock the screen and check (using a call to time.sleep), it also returns False. I have checked that calling: session_manager.SetActive(True, dbus_interface='org.gnome.ScreenSaver') Correctly activates the screensaver, so that part seems to be working. However, even in that case, if after activating the screensaver I call GetActive it returns False. From looking at the code [1], I suspect the problem is that when I lock the screen via Ctrl-Alt-L, the internal _active member is not being set to True, but I'm not sure what might be going on with the variable after SetActive is called. [1]: http://bazaar.launchpad.net/~unity-greeter-team/unity- greeter/trunk/view/head:/src/settings-daemon.vala#L172 To manage notifications about this bug go to: https://bugs.launchpad.net/unity/+bug/1342152/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp