Logo Search packages:      
Sourcecode: guidance-power-manager version File versions

def guidance-power-manager::PowerManager::lockScreen (   self  ) 

locks the screen using dbus 

Definition at line 446 of file guidance-power-manager.py.

00446                         :
        """ locks the screen using dbus """
        # init dbus session bus
        bus = dbus.SessionBus()
        # assign screensaver object
        dbus_screensaver = bus.get_object('org.freedesktop.ScreenSaver',
        # make screensaver methods available: Lock(), GetActive(), SetActive(bool),
        ScreenSaver = dbus.Interface(dbus_screensaver, 'org.freedesktop.ScreenSaver')
        # Lock the Screen or print a warning.
        # No return value when successful, not sure otherwise.
            print "Unable to lock the screen. There is a problem with the dbus connection to org.freedesktop.ScreenSaver.Lock()"

    def suspend(self):

Generated by  Doxygen 1.6.0   Back to index