Running Multiple Versions of Firefox

Posted on timeNovember 10th, 2008 by userRay Baxter


A question:

“I want to create a custom launcher for Firefox 2 and Firefox 3 with different profiles. Perhaps the real question is how do we create a custom version of a Mac application launcher, passing in the arguments we need?”

… without having to invoke it on the command line every time.

Mac OS X is assumed.

Firefoxen is an answer in code. It’s a script to automatically configure multiple installations of Firefox so that they open with different profiles. The script encapsulates what I needed to do to figure out how to solve this problem.

The steps are:

  1. Modify each application’s Info.plist CFBundleExecutable to point to a shell script inside the application’s bundle
  2. Create the appropriate shell script that runs ./firefox-bin -P profile-name in each bundle.
  3. Reregister the application’s bundle with launchservices so that the changes are picked up. Normally they are cached.

Only the last of these took too longer to figure out. You can trigger an update of launchservices by renaming the application bundle (Firefox.app => Firefox3.app), but if you rename it back it seems to revert to the previous db entry. (Cached by application name?)

Unfortunately, you can’t combine 1 and 2 either. I tried multiple permutations on changing the CFBundleExecutable parameter in each bundle from the default firefox-bin to something like firefox-bin -P versioned-profile but I couldn’t make it work with any amount of quoting.

Git it here: http://github.com/yesteray/firefoxen/tree

Here’s a screen grab:

Running 4 versions of Firefox.

Running 4 versions of Firefox.

tag



tag2 Responses to “Running Multiple Versions of Firefox”

  1. Jonathan Barnes Says:

    Ray, I and others have been struggling to get firefox to launch with a profile for hours, thank you so much for this ruby script and general how to!

  2. Boundary Conditions » Blog Archive » Single Purpose Web Dev Browser Says:

    [...] the web. This morning, it occurred to me that I could use the techniques that I used in creating Firefoxen to create a special purpose web application development [...]

Leave a Reply


Search:

Recent Posts

Categories

Relevant Links

AtomPub

Date and Time

GCalendar

GData

iCalendar Tools

Online Calendars

REST

RFCs

Timelines

Zend GData

Feeds: