BunsenLabs / bunsen-pipemenus

A collection of Openbox pipemenus for use with BunsenLabs
https://pkg.bunsenlabs.org/debian/pool/main/b/bunsen-pipemenus/
GNU General Public License v3.0
29 stars 11 forks source link

Terminal execute command syntax errors #17

Closed cpoakes closed 9 years ago

cpoakes commented 9 years ago

The "-e" (execute) option argument is supported across the range of common programs used for the x-terminal-emulator, but the invocation is not uniform. It may be quoted or unquoted:

x-terminal-emulator -e "man tint2"              
x-terminal-emulator -e man tint2                

Some emulators require one form or the other, with no common denominator:

                Only            Only                            Unquoted
                quoted          unquoted        Either          using "-x"
xterm                                           X               NA
urxvt                           X                               NA
xfce4-terminal  X                                               X
lxterminal                                      X               NA
roxterm                         X                               NA
terminator      X                                               X

Note that all emulators requiring quotes with "-e" also accept unquoted versions using "-x" in place of "-e" (as noted). The pipemenus need to set correct -e/-x (or quoted/unquoted) commands to accommodate all x-terminal-emulator alternatives.

Sector11 commented 9 years ago

How many terminals are there going to be in Bunsen?

capn-damo commented 9 years ago

Just one emulator I guess, but it makes sense that the utility scripts should work with any others that a user may install. It could be a lot of work though, if quoted/unquoted is important, because of quoted commands within other scripts.

cpoakes commented 9 years ago

Just reviewed forum discussion, last johnraff was leaning toward xfce4-terminal as the default for x-terminal-emulator. (I note other terminals were mentioned that I did not include in my tests: sakura, mate-terminal). However, if we are going to use x-terminal-emulator, we should support any valid choice. Otherwise we should create bl-terminal-emulator alternative to restrict the set of possibilities.

johnraff commented 9 years ago

x-terminal-emulator is required to support the unquoted variation, ie what comes after the -e is a command and its arguments. https://www.debian.org/doc/debian-policy/ch-customized-programs.html#s11.8.3

xfce4-terminal does in fact support that when called as x-terminal-emulator because what is actually registered with debian alternatives is a wrapper script xfce4-terminal.wrapper. All other terminals providing x-terminal-emulator should support that syntax either natively or through such a wrapper script.

(The failure of Terminator on Wheezy to support that syntax, although registering itself as an x-terminal-emulator alternative, was a long-standing bug which has been fixed on its Jessie version.)

cpoakes commented 9 years ago

@johnraff - I appreciate your thoroughness in finding the policy docs and pointing out the function of the wrapper script (and the -T requirement on the other issue). FYI: Mate-terminal and gnome-terminal share the same limitation and also provide a wrapper. Sakura as x-terminal-emulator supports -e, but does NOT support -T (Debian bug report filed).