9 class ScreenDbusObj(dbus.service.Object):
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')
15 @dbus.service.method("org.gnome.ScreenSaver")
17 os.system( "xscreensaver-command -lock" )
20 if __name__ == '__main__':
21 object=ScreenDbusObj()
22 gobject.MainLoop().run()