Comment 3 for bug 198339

Revision history for this message
dal (blairdfraser) wrote : Re: [Bug 198339] Re: command execution event gives anomalous results

Yep, that seems to be working...now on to the next step - to work out why
xclip -o is messing up my single and double quote characters heh

ty again olli :)

On Wed, Mar 5, 2008 at 12:59 AM, Olli Salonen <email address hidden> wrote:

> The quoted command bug is known:
> https://bugs.launchpad.net/btnx/+bug/179715
>
> My system (Ubuntu 7.04) uses a script to launch Firefox by default in
> order to set the environment correctly for the browser. Just changing the
> UID does not help in this case and it causes all sorts of headaches.
> The solution to that was to make a script in the user's home directory to
> launch Firefox and tell btnx-config to execute this script.
>
> First, see what executable your default Firefox desktop or menu shortcut
> uses, to make sure Firefox is getting launched correctly.
> Then make the script, and use "su" to change to the correct user (leave
> UID to zero, su requires root privileges).
>
> Example of what the script might look like:
> su -c "/usr/bin/firefox -new-tab http://www.google.com" user_name
>
> Then in btnx-config, just give the location of the script for the execute
> command i.e. /home/user_name/firefox_btnx_script (make sure it has
> executable flags set, chmod).
> Let me know if that helps. The solution to this bug would probably be to
> change the UID field to a user name field, and always use su by default to
> execute commands.
>
> --
> command execution event gives anomalous results
> https://bugs.launchpad.net/bugs/198339
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in btnx-config: btnx configuration tool: New
>
> Bug description:
> As one step in the process of setting up the search button on my MX
> Revolution I set it in btnx-config to event type:command execution and set
> the uid to my user's uid and the command to
> /usr/bin/firefox-3.0 -new-tab http://www.google.com
> Typing this command in bash when firefox is already running results in the
> desired effect - a new tab opens with google in it. But when i click the
> mouse button that command is mapped to i get a messagebox telling me
> firefox-3.0 is already open but not responding and to close it before
> opening a new window. I assumed that btnx-config might be getting confused
> over the fact that there was a space in the middle of this command so I
> tried wrapping the whole thing in firstly doubly then single quotes, but in
> both cases this stopped anything from happening when I clicked the search
> button. I also noticed later that running firefox-3.0 when firefox is
> already running just opens a new window rather than bringing up the
> messagebox anyhow so I guess the space in the middle of the command isn't
> the problem - but as I'm doing exactly the same thing from the commandline
> and it works I can't begin to guess what the problem might be.
>
> Anyhow, thanks a bunch for putting together this software in the first
> place, it's a lot less painful setting up mouse buttons with btnx than
> xmodmap etc :)
>