[openbox] command contains $ and &

Jonas J Linde jonas at init.se
Tue Dec 14 15:11:59 EST 2010

And Johan Vromans spoke unto the world. And said:
>Jonas J Linde <jonas at init.se> writes:
>>>2. command contains &
>>><action name="Execute">
>>>    <command>rdesktop xxx.xxx.xxx.xxx -u administrator -p xxxx&xxxx</
>> And I'd use the same trick for that.
>Why? I see no reason why 
>  <command>rdesktop xxx.xxx.xxx.xxx -u administrator -p xxxx&amp;xxxx</command>
>should not work (It doesn't, since it leaves &amp; in the command
>instead of substituting a & . However, using a single & makes the XML
>parser barf.)

Hi again!

I was a bit sloppy in my previous comment but the construction

  <action name="Execute"><command>sh -c "command1&amp;command2"</command></action>

works perfectly although the same thing can be done with

  <action name="Execute"><command>command1</command></action>
  <action name="Execute"><command>command2</command></action>

But sometimes you might want to do something like

  <action name="Execute"><command>sh -c "command1&amp;&amp;command2"</command></action>

which I don't know any alternative for - except creating a shell
script to run instead of the combined commands.

Jonas J Linde <jonas at init.se>   http://jonas.init.se/   +46-707-492496
GE/IT$ d-(+) s++: a+ C++(++++)$ UBVL++(++++)$ P+++ L+++$ E++ W++(-) N+
o-- K+ !w(+) O M@ V PS+ PE++(-) Y+ PGP+(++) t 5 X R-(+) tv--  b+>++ DI
D++ G+(-) e+++ h---- r++ y++++ UF+

More information about the openbox mailing list