Firefox Launch (Linux only)

UPDATE: Firefox 1.0.6 and previous are affected by a vulnerability that lets urls contain programs to be launched on the local machine. See the bugzilla item for details. Firefox 1.0.7 has been released to fix this bug in the launch script, so I suggest you update. If this is not an option, you can use Firefox Launch, which I have updated so that it is not vulnerable to the same problem.

UPDATE:As of 1.0.6 the default launch script seems to work fine, so there seems little need for Firefox Launch any further.

UPDATE: The script works with the new Firefox 1.0.1 release, and I've done some code updates that should provide better performance ( now exits immediately after launch so the Python interpreter doesn't run continuously in the background).

UPDATE: I have changed the script to work with the .9 series of Firefox thanks to some help from Bryan Thorne. Thanks Bryan!

Firefox for Linux has a frustrating habit of trying to open a new "profile" if you launch more than one copy of the browser at once (from, say, multiple links in gaim).

While I'm sure it's got a useful function, this annoyed me quite a lot. I got around the problem in most cases by setting the "browser" preference in gaim to a command that launched the url in a new tab in an existing Firefox.

However, if a copy of Firefox was not already running, I was S.O.L. This not being an acceptable solution, I eventually got fed up enough to whip up this script that will check for an open Firefox, and open the url passed to it on the command line in a new tab, or if Firefox isn't running, it will launch a new instance to the url.

If you just run the script with no arguments, it will launch firefox to your homepage. Install instructions are pretty simple: copy somewhere useful in your path, such as: /usr/local/bin/firefox so that if you run "firefox" it will run the script. You'll need to edit the variable "firepath" at the top of the script to point to wherever it was you installed Firefox.

If you have any suggestions, improvements, or questions, please contact me at jloden at and feel free to submit any improvements and I'll post 'em here

Firefox Launch (Linux):

view the script here
new window instead of tab script here