Guest, Sunday 21 October 2012 à 21:03
|
|
|
I am running Ubuntu 12.04 with gnome-shell and xscreensavor rather than the stupid standard gnome one. When I run the Screensaver_inhibitor it wasn't working, nor was it giving an error message. So I took a look as the python code for the plugin and edited it, now it works. From what I can see the code makes the assumption that if you are running a gnome-sesson you must be using the gnome screensaver which is incorrect.
Below are my edits:
def _guess_method(self):
bus = dbus.SessionBus()
# edits made my jose because I am using xscreensaver and not the normal gnome one
#################################################################
#if 'org.gnome.SessionManager' in bus.list_names():
# self.ss_method = "Gnome"
# self.pm_method = "Gnome"
#else:
##################################################################
if 'org.freedesktop.ScreenSaver' in bus.list_names():
self.ss_method = "Freedesktop"
elif isProcessRunning("xscreensaver"):
self.ss_method = "xscreensaver"
elif isProcessRunning("gnome-screensaver"):
self.ss_method = "gnome-screensaver"
if 'org.freedesktop.PowerManagement.Inhibit' in bus.list_names():
self.pm_method = "Freedesktop"
else:
self.pm_method = "dpms"
|
matttbe, Sunday 21 October 2012 à 23:15
|
|
Subscription date : 24 January 2009
Messages : 12573
|
Hello and thank you for this bug report!
Yes, you're right!
@fabounet: maybe if 'org.gnome.SessionManager' in bus.list_names(): should be tested at the end? |
Guest, Monday 22 October 2012 à 14:00
|
|
|
matttbe : Hello and thank you for this bug report!
Yes, you're right!
@fabounet: maybe if 'org.gnome.SessionManager' in bus.list_names(): should be tested at the end?
That would make more sense than having it at the beginning like it currently is. |
fabounet, Saturday 27 October 2012 à 01:41
|
|
Subscription date : 30 November 2007
Messages : 17118
|
ok thanks, it is pushed |
|