← Back to team overview

desktop-packages team mailing list archive

[Bug 1342152] Re: GetActive method for the screensaver reports False even when screensaver is active

 

Lockscreen != Screensaver.

So, this is false when the screen is not turned off for power saving
reasons, and that's fine.

You can instead check if the session has been locked using this call instead:
  gdbus call --session --dest com.canonical.Unity \
    --object-path /com/canonical/Unity/Session \
    --method com.canonical.Unity.Session.IsLocked

** Changed in: unity
       Status: New => Won't Fix

** Changed in: unity (Ubuntu)
       Status: New => Won't Fix

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to unity in Ubuntu.
Matching subscriptions: dp-unity
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