Bug#489372: tritium ignores DISPLAY- patch included fixes that and also stubs missing usage()

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#489372: tritium ignores DISPLAY- patch included fixes that and also stubs missing usage()

Tony Godshall
wow, this bug has been open since 2008!?  maintainer MIA?

-- root@ada64:~# diff -Naur /usr/bin/tritium /usr/bin/tritium.hacked
--- /usr/bin/tritium    2010-03-29 21:32:43.000000000 -0700
+++ /usr/bin/tritium.hacked     2013-04-08 10:26:47.000000000 -0700
@@ -45,6 +45,10 @@
     Any_space = Any_Down = C_n = menu.MenuKeyHandler._down
     Any_BackSpace = Any_Up = C_p = menu.MenuKeyHandler._up

+def usage():
+    print "right now all we understand is -d for debug"
+    os.abort()
+
 class TritiumClient( wmanager.Client,
                      tritium.frame.FrameClient,
                      tritium.frame.tab.TabClient,
@@ -149,7 +153,8 @@
         os.execvp( executable, sys.argv[1:] )

 if __name__ == '__main__':
-    os.environ[ "DISPLAY" ] = ":0"
+    if not os.environ.has_key("DISPLAY"):
+        os.environ[ "DISPLAY" ] = ":0"

     level=logging.INFO
     # right now all we understand is -d for debug


Best Regards.
This is unedited.


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Bug#489372: tritium ignores DISPLAY- patch included fixes that and also stubs missing usage()

Kevin Ryde
Tony Godshall <[hidden email]> writes:
>
>  if __name__ == '__main__':
> -    os.environ[ "DISPLAY" ] = ":0"
> +    if not os.environ.has_key("DISPLAY"):
> +        os.environ[ "DISPLAY" ] = ":0"

Usually there's no need to have a default or fallback for $DISPLAY.  If
it's not set then you're not under X.  I suggest just delete the :0 line.


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]