Bug#705008: tritium ignores DISPLAY, missing usage() function

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

Bug#705008: tritium ignores DISPLAY, missing usage() function

Tony Godshall
Package: tritium
Version: 0.3.8-2
Severity: important
Tags: upstream patch

Dear Maintainer,

This patch[1] fixes two issues:

1. DISPLAY is ignored and thus tritium will only manage display :0

2. Error processing when an arg is passed[2]

Hope this helps others.

Tony

[1]
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

[2]

tony@ada64:~$ tritium $DISPLAY &
[1] 5141
tony@ada64:~$ Traceback (most recent call last):
  File "/usr/bin/tritium", line 170, in <module>
    usage()
NameError: name 'usage' is not defined


-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-rt-amd64 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages tritium depends on:
ii  python           2.7.3-4
ii  python-contract  1.4-3
ii  python-plwm      2.6a+20080530-1.1
ii  python-support   1.0.15
ii  python-xlib      0.14+20091101-1

tritium recommends no packages.

tritium suggests no packages.

-- no debconf information


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

Reply | Threaded
Open this post in threaded view
|

Bug#705008: tritium ignores DISPLAY, missing usage() function

Vagrant Cascadian-4
Control: forcemerge 705008 489372
Control: tags 705008 pending

On Mon, Apr 08, 2013 at 10:36:56AM -0700, Tony Godshall wrote:
> This patch[1] fixes two issues:
>
> 1. DISPLAY is ignored and thus tritium will only manage display :0
>
> 2. Error processing when an arg is passed[2]

Thank for the patch!

Applied to git, and will upload... someday!


live well,
  vagrant


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