]> code.delx.au - bg-scripts/blobdiff - wallchanger.py
Fixed the oneshot mode
[bg-scripts] / wallchanger.py
index b48775ebfb590a489472117f330a29d119e3f227..a9c894506dacf36f1dd7cbe6953b7108c9cb2e9a 100755 (executable)
@@ -31,7 +31,7 @@ def init(*args, **kwargs):
        else:
                if os.uname()[0] == 'Darwin':
                        # Try to detect if the X11 server is running on OSX
-                       if commands.getstatusoutput("ps ax -o command|grep -q '/.*X11 .* %s'" % os.environ['DISPLAY'])[0] != 0:
+                       if commands.getstatusoutput("ps ax -o command|grep -q '^/.*X11 .* %s'" % os.environ['DISPLAY'])[0] != 0:
                                # X11 is not running for this display
                                return
 
@@ -40,7 +40,7 @@ def init(*args, **kwargs):
                changers.append(KDEChanger(*args, **kwargs))
 
        logging.debug("Testing for Gnome")
-       if commands.getstatusoutput("xwininfo -name 'gnome-session'")[0] == 0:
+       if commands.getstatusoutput("xwininfo -name 'gnome-settings-daemon'")[0] == 0:
                changers.append(GnomeChanger(*args, **kwargs))
 
        logging.debug("Testing for WMaker")