command execution event gives anomalous results
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
btnx-config |
New
|
Undecided
|
Unassigned |
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/
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 :)
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: www.google. com" user_name
su -c "/usr/bin/firefox -new-tab http://
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.