[Portland] Patch for xdg-terminal, not launching generic terminal

wwp subscript at free.fr
Wed Apr 24 01:25:20 PDT 2013


Hello there,


I've been testing xdg-terminal recently and it doesn't seem to launch
the generic terminal. Thus I'm proposing the following patch:

--- xdg-terminal        2013-04-19 11:48:54.068627625 +0200
+++ xdg-terminal-patched        2013-04-19 12:07:42.000000000 +0200
@@ -400,9 +400,15 @@
         TERM=xterm
     fi

-    terminal_exec=`which $TERM >/dev/null 2>/dev/null`
+    terminal_exec=`which $TERM 2>/dev/null`

     if [ -x "$terminal_exec" ]; then
+        if [ x"$1" == x"" ]; then
+            $terminal_exec
+        else
+            $terminal_exec -e "$1"
+        fi
+
         if [ $? -eq 0 ]; then
             exit_success
         else

Of course the patch should be applied to xdg-terminal.in instead.

Without this, terminal_exec is always empty since both stdout and
stderr are thrown away and testing -x is useless below.

Moreover, the code was not launching the generic terminal at all,
whereas it is necessary because terminal_generic is called as a
fallback when either no desktop could have been identified or when the
per-desktop user default terminal could have not been launched.

Any thought?


Regards, 

-- 
wwp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/portland/attachments/20130424/527186ff/attachment.pgp>


More information about the Portland mailing list