cleaning and moving a lot of files.
[feisty_meow.git] / database / configuration / xscreensaver / screenLock.py
1 #!/usr/bin/python
2  
3 import dbus
4 import dbus.service
5 import dbus.glib
6 import gobject
7 import os
8  
9 class ScreenDbusObj(dbus.service.Object):
10     def __init__(self):
11         session_bus = dbus.SessionBus()
12         bus_name=dbus.service.BusName("org.gnome.ScreenSaver",bus=session_bus)
13         dbus.service.Object.__init__(self,bus_name, '/org/gnome/ScreenSaver')
14  
15     @dbus.service.method("org.gnome.ScreenSaver")
16     def Lock(self):
17         os.system( "xscreensaver-command -lock" )
18  
19  
20 if __name__ == '__main__':
21     object=ScreenDbusObj()
22     gobject.MainLoop().run()
23