[openbox] problems with tilde characters in commands

Anthony Thyssen A.Thyssen at griffith.edu.au
Mon Apr 6 19:21:44 EDT 2009

On Mon, 6 Apr 2009 10:54:36 +0200
vlad <vla at uni-bonn.de> wrote:

| On Mon, Apr 06, 2009 at 04:18:32PM +1000, Anthony Thyssen wrote:
| > I have been adding keyboard macros in openbox with great success, though
| > this does require a understanding of Xwindow Event handling to get it to
| > work right.
| > 
| > But find that if I want a '~' in the arguments to a command that is to
| > be run by Openbox, it expands that character when it should not do so.
| > 
| > For example in my openbox rc.xml  I remoaced the Super Function
| > keybindings with keyboard macros such as....
| > 
| >     <keybind key="W-F2">
| >       <action name="Execute">
| >         <startupnotify>
| >           <enabled>true</enabled>
| >           <name>Keyboard Macro: Web Page</name>
| >         </startupnotify>
| >         <command>xte 'usleep 500000' \
| >                      'str http://www.cit.gu.edu.au/~anthony/'</command>
| try:
|          <command>bash -c "xte 'usleep 500000' 'str http://www.cit.gu.edu.au/~anthony/'"</command>
| >       </action>
| >     </keybind>
| > 
I also tried this.  The problem is NOT "xte" or "bash"  but openbox.
The tilde character still gets expanded by "openbox" and the result
is still the same, with the sting becoming
This happens BEFORE either "bash" or "xte" even sees the argument!

The only solution I have yet seen is a horrible complex command
involving a command substitution, with the tilde being generated from
its octal character code.  It is long, convoluted and obtuse, and one I
should NOT need to do.

Open box itself needs to be fixed either to NOT expand tilde
or allow &tilde; or &#7E; like it is supposed to for XML handling.

  Anthony Thyssen ( System Programmer )    <A.Thyssen at griffith.edu.au>
    In the room is:  A Huge Fierce Green Dragon
    > drop bird
    With a great flurry of feathers, the little bird gets burnt to a cinder!
    Ashes blow away.                  --- Advent, the first computer adventure
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/

More information about the openbox mailing list