[openbox] problems with tilde characters in commands

Mikael Magnusson lists at bak.och.fr.am
Mon Apr 6 19:24:26 EDT 2009

On Tue, 7 Apr 2009, Anthony Thyssen wrote:

> On Mon, 6 Apr 2009 16:47:15 +1000
> Lennon Cook <lennon at riscque.net> wrote:
> | Anthony Thyssen <anthony at griffith.edu.au> wrote:
> | > How can I get Openbox to give a command a '~' in the argument without
> | > openbox erroneously expanding it?
> | Try using &tilde; , eg:
> |         <command>xte 'usleep 500000' \
> |                      'str
> | http://www.cit.gu.edu.au/&tilde;anthony/'</command>
> |
> As I said in my original report, I already tried this...
>   One or more XML syntax errors were found ......
>   ....
>   Entity 'tilde' not defined
> I also had tried to use  &#7E;
>   xmlParseCarRef: invalid xmlChar value 0
> In other words, not only are tilde's expanded when they shouldn't be
> (in the middle of a quoted argument) but openbox does not follow
> normal XML syntax rules either!

I think you will find that if you actually use valid XML, it will work 
just fine. Openbox will still replace the tilde with your homedir though, 
since that takes place after the XML parsing.

Mikael Magnusson

PS &#x7E;
&tilde; is not a predefined xml reference, quoth wikipedia:

Special characters can be represented either using entity references, or 
by means of numeric character references. An example of a numeric 
character reference is "&#x20AC;", which refers to the Euro symbol by 
means of its Unicode codepoint in hexadecimal.

An entity reference is a placeholder that represents that entity. It 
consists of the entity's name preceded by an ampersand ("&") and followed 
by a semicolon (";"). XML has five predeclared entities:

     * &amp; (& or "ampersand")
     * &lt; (< or "less than")
     * &gt; (> or "greater than")
     * &apos; (' or "apostrophe")
     * &quot; (" or "quotation mark")

More information about the openbox mailing list