Multiple Firefoxes

Firefox 3.5 officially came out a few weeks ago, and I decided its time to try it out. However, google gears does not yet work on 3.5, and I need my gears to have offline access to gmail and google docs. Time to revisit the question I’ve had many times before -
Can i run different versions of firefox at the same time? or different instances of the same version? … Yes.
The solution involves Firefox Profiles. Profiles are separate from the application itself - it’s where all your customized data is stored, like homepage, history, saved form info, settings, plugins, etc. In order to run 2 firefoxes at the same time, you need 2 different profiles. It doesn’t matter which version of firefox is running a profile. For example, you could have 4 profiles like me:
- Firefox3.0 - google gears in here - use this for offline gmail access
- Firefox3.0_heavy - firebug and other add-ons in here
- Firefox3.5 - surf the web from here
- Firefox3.5_Guest - clean empty profile with no history, used in business meetings
Firefox has good instructions on creating profiles, so I’m going to skip that. Next step is to figure out a way to easily launch your profiles - here is where it gets into MAC only mode, but not much different for Windows. If you only have one profile for each version of firefox, you can edit the files inside the firefox app directly, like Devon did. (Another way is to create an application bundle). So what happens if you want to run 2 instances of the same firefox version? Well, expanding on Devon’s way, just create a script (executable text file) in your /Applications folder that calls the firefox version and profile you want.
However, neither Devon’s solution nor the application bundle is perfect - there are still some dock issues. First, with both solutions, there will be an icon that launches firefox with your favorite profile, and when you click on it, it creates another firefox icon on the doc. Ideally it should act like finder or any other mac app - the icon you click on the dock is the one that should bounce and start up. It should also be the one to right click and “Quit”. Its confusing enough already when there’s 2 firefox apps running, i don’t need extra icons. Second, I’m also a big fan of switching between my running applications using Command-Tab (like Alt-Tab in Windows), and when I do that I want the names of the different firefoxes to match to profiles and versions if possible.
So my solution is to have a one-to-one mapping of application name to profile name. For example, given the 4 profiles above, I have 4 copies of firefox in my applications folder
- /Applications/Firefox3.0.app
- /Applications/Firefox3.0_Heavy.app
- /Applications/Firefox3.5.app
- /Applications/Firefox3.5_Guest.app
Each one of these I edited the Contents/MacOS directory, renaming firefox-bin to firefox-bin1 and creating a firefox-bin script (like Devon did). Each script is uses its own directory and profile. For example, here’s the contents of my /Applications/Firefox3.5.app/Contents/MacOS/firefox-bin file:
/Applications/Firefox3.5.app/Contents/MacOS/firefox-bin1 -P Firefox3.5 &
The last thing I do to make it easy on myself is to create a bookmark on the toolbar, all the way left on each of the 4, where the name of the bookmark is the name of that profile. That way I can look at the window and know which firefox profile i’m using.
The downside to this is that you waste some disk space (its about 50MB for each firefox installation). The other thing that kinda sux is that if you rely on firefox to remember password forms, you must remember to always use the same profile/app, but that isn’t hard if you do my bookmark trick.
Update 11/2: Here’s how I handle firefox updates (like from 3.5.3 to 3.5.4).
Basically i reinstall my fix after update. That is, rename firefox-bin to firefox-bin1, then create firefox-bin script.
However, This used to work but today it no longer does. Basically if i call firefox-bin1 -P Firefox3.5 from cmd-line, it works. But the app uses the default profile instead. My workaround is to create and use “application bundle” method linked above. still testing …
Others attempts (but no mention of my dock issue)
- http://67central.com/bc/2009/02/07/single-purpose-web-dev-browser/
- http://stackoverflow.com/questions/730748/how-to-change-the-executable-in-an-os-x-application-bundle
- http://weblogs.mozillazine.org/asa/archives/2008/08/shortcut_to_lau.html









