]> code.delx.au - bg-scripts/commitdiff
Fixed the X11 check for Darwin (it used to find itself in the process listing and...
authorGreg Darke <greg@tsukasa.net.au>
Mon, 21 Jul 2008 08:27:11 +0000 (18:27 +1000)
committerGreg Darke <greg@tsukasa.net.au>
Mon, 21 Jul 2008 08:27:11 +0000 (18:27 +1000)
wallchanger.py

index b48775ebfb590a489472117f330a29d119e3f227..6c2ba004c3b14ad0a69b5909c62b7242c899c6ce 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