-how to fix your screensaver after ubuntu oneiric ocelot wipes everything out:
+how to fix your screensaver after ubuntu oneiric ocelot or later wipes
+xscreensaver out:
this page has good info about most of what's needed:
http://www.webupd8.org/2011/10/things-to-tweak-after-installing-ubuntu.html
+++ /dev/null
-#!/usr/bin/python
-
-import dbus
-import dbus.service
-import dbus.glib
-import gobject
-import os
-
-class ScreenDbusObj(dbus.service.Object):
- def __init__(self):
- session_bus = dbus.SessionBus()
- bus_name=dbus.service.BusName("org.gnome.ScreenSaver",bus=session_bus)
- dbus.service.Object.__init__(self,bus_name, '/org/gnome/ScreenSaver')
-
- @dbus.service.method("org.gnome.ScreenSaver")
- def Lock(self):
- os.system( "xscreensaver-command -lock" )
-
-
-if __name__ == '__main__':
- object=ScreenDbusObj()
- gobject.MainLoop().run()
-
--- /dev/null
+#!/usr/bin/python
+
+import dbus
+import dbus.service
+import dbus.glib
+import gobject
+import os
+
+class ScreenDbusObj(dbus.service.Object):
+ def __init__(self):
+ # stuff the logging into a temporary and hidden directory.
+ try:
+ os.chdir(os.environ['HOME'] + "/.zz_temp_screenlock_menu");
+ except:
+ os.mkdir(os.environ['HOME'] + "/.zz_temp_screenlock_menu");
+ os.chdir(os.environ['HOME'] + "/.zz_temp_screenlock_menu");
+ session_bus = dbus.SessionBus()
+ bus_name=dbus.service.BusName("org.gnome.ScreenSaver",bus=session_bus)
+ dbus.service.Object.__init__(self,bus_name, '/org/gnome/ScreenSaver')
+
+ @dbus.service.method("org.gnome.ScreenSaver")
+ def Lock(self):
+ os.system( "xscreensaver-command -lock" )
+
+if __name__ == '__main__':
+ object=ScreenDbusObj()
+ gobject.MainLoop().run()
+