I actually know why that's a problem and it causes another issue you
didn't encounter since your command has no arguments.
While seems to parse what you feed it according to shell quoting rules
(which discards the trailing space unless it's quoted), URxvt simply
feeds it verbatim to exec().
That means that LXPanel's bug would only execute commands where the
filename actually ends with a space.
The other problem which pops up with arguments is that, while XTerm
accepts the input to -e as either one big argument or a sequence of them:
xterm -e "bash -c 'echo foo; read'"
...urxvt REQUIRES it to be pre-parsed and passed as one urxvt argument
per exec() argument:
urxvt -e bash -c 'echo foo; read'
Both approaches make sense (xterm's is easier for lxpanel-style use
while urxvt's discourages application developers from writing or finding
potentially buggy quoting routines that can lead to vulnerabilities)
Unfortunately, since non-xterm terminals like LXTerminal only accept the
"all in one argument" approach, we can't all just use URxvt's syntax either.
Anyway, assuming lxterminal doesn't already do parsing for you, I can
see two options:
1. There's an unreleased XDG utility named xdg-terminal which I've
patched to hide this oddity from the user:
2. You could either use a C equivalent to Python's shlex.split() before
handing it off to urxvt or wrap calls to rxvt, rxvt-unicode, or urxvt in
this shell script call:
sh -c "exec $rxvt_command -e $string_to_parse"
On 12-11-24 06:20 AM, Jörg-Volker Peetz wrote:
> Dear Developers,
> as already reported in the Debian bug tracking system
> (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=687615 ) I encountered the
> following problem with lxpanel version 0.5.10:
> setting "Terminal=urxvt" in the main config file does not work, while
> setting "Terminal=xterm" is o.k. With the urxvt setting the terminal is
> terminated immediately. Looking for the cause, I noticed that lxpanel
> appends a blank to the exec-command given in the desktop file used for the
> menu generation.
> For example with octave, lxpanel tries to launch a command made up of
> three strings:
> "urxvt", "-e", "/usr/bin/octave"
> Notice the blank at the end of the third string. The xterm program has
> no problem with this additional blank, but urxvt terminates immediately
> as can be tested easily from the shell:
> urxvt -e "/usr/bin/octave "
> Possibly this is an error in the code of lxpanel.
> By the way, in the documentation at http://wiki.lxde.org/en/LXPanel it
> is wrongly stated that the "-e" should be given in the Terminal
> definition, whereas lxpanel appends "-e" internally.
> Many thanks in advance for your consideration