Running Firefox in parallel

Posted on 1 February 2008 at 23:14 UTC, filed under Tricks, disclaimer

Sometimes it would just be great to have multiple instances of Firefox running at the same time. Some web applications just love to eat memory in Firefox, some web pages go crazy if you have JavaScript enabled and sometimes you just want different sets of cookies to let you manage two accounts at the same time.

I’ve been trying to do that for years and did the most exotic things to make it happen. I’ve used four different browsers in parallel and I’ve even used a virtual PC running within my PC (that kind of defeats the desire to use less memory, but it feels neat anyway). In the end, a collegue in the office, who happens to use emacs as his main web browser :D , pointed me into the right direction.

Now I have three completely independant instances of Firefox running at the same time!

3 little Firefoxen, running on a desktop

So what’s the trick?

Firefox has command line options to let you start multiple profiles and specify a certain one. In our case, we’re going to change the command line to:

“C:\Program Files\Mozilla Firefox\firefox.exe” -no-remote -P NewProfileName

To get started, check the name of your current profile. On Windows you can find it in “c:\Documents and Settings\[user-name]\Application Data\Mozilla\Firefox\Profiles”. It will generally have a few characters and numbers, a period and then the profile name (in my case it was something like “36fc232a.default”). Use this to adjust the settings of the icon you use to start up Firefox. On Windows, right-click on the icon and select “Properties”; you can add the options in the field called “Target”:

Firefox profile settings

If you click on that icon now, it should start up Firefox just as before (ok, this is not the neat part yet :D ).

Now make a copy of the icon (I right-click drag it into a folder and select “Copy”) and change the command line options (and file name) again, only this time choose a different profile name. If you want to use a copy of your existing profile (with all cookies, bookmarks, themes and add-ons), you can do that by going into the folder where your profiles are stored (mentioned above) and copying your default profile. Now when you start up Firefox with that icon, it will bring the profile manager since it can’t find that new profile. Create a new profile and use the exact name you used in the options. You will then have a choice of either creating a completely new profile or using an existing profile folder.

Now you have two instances of Firefox running at the same time. They’re completely separate, so if one crashes, the other will continue normally. If one starts using too much memory, you can close it and restart it without impacting the other one. If you have conflicts with add-ons or want to use different cookie sets, just use a separate instance.

Since the various instances will generally look the same and be hard to keep apart, I just applied different themes to them. The “Safari-style” theme is my private one, the blue one is used for all my work-apps and the normal one is used for all kinds of testing.

This trick should work on all platforms with Firefox, not that I tried it out so try it at your own risk :) . Now if only I could migrate my IE profile back to Firefox …

There are 2 trackback pings to this post.
  1. […] Running Firefox in parallel » johnmu.com Running completely separate instances of FireFox simultaneously (different profiles, cookies, etc.) […]

  2. […] bucur de instante multiple in firefox http://johnmu.com/firefox-multiplied/ […]

There are 11 comments to this post.
  1. That’s a very nice trick indeed John – thatnks for the heads up.

    By the way – speaking about things that kind of defeat the purpose – did you know that your ‘spam protection’ – sum of x + y thingo autocalculates the sum and fills in the box? That’s kind of cool for those of us that are mathematically challengedm though :D

  2. Very interesting. Thanks for the tip, John!

  3. Thanks for the tip – it will come in handy as I always have the need for multiple browsers with different cookie settings.

  4. Hi, John.
    Thats nice tricks, actually i just seen new Firefox [3] but due to compatibility problem with most of the WEBMASTER related pluginns , i just switched back to old Firefox 2.14. Is there any was to use BOTH the Firefox(2 and 3) in same PC ?without affecting each other.

  5. Now that is really really clever. :)

    I’ve also got a number of browsers installed – IE, FF, Opera, Seamonkey and Chrome – interesting to know I can now run multiple instances of FF as well!!

  6. I love this, Thanks! (23 December 2008 at 5:05 pm):

    Thanks!, this is awesome

  7. Thanks John, been looking for a suitable solution to this for a while now, I’ve 3 profiles and have been closing one to go to another for too long, cheers

  8. I have been running multiple instances for the past couple of years and have one issue for which I have not found a solution; when each instance starts I get a “Firefox has been updated” tab even though I have not updated Firefox. The first time it happened was after updating Firefox and it has not stopped since. I’m still looking for a solution, any ideas welcome.

  9. Does anyone know if this would work with a pre-release copy of Firefox, I keep wanting to test some of the new stuff out but want to be able to shift back to my current install without issue.

  10. I want to load extensions automatically without restarting firefox when ever i do a modification.
    Is that possible. Now when i change a js file for an extension i need to close and reopen firefox for the modification to take effect. instead is that any method to reload the modified js file without restarting firefox?

  11. Bernhard Eckl (25 May 2011 at 2:07 am):

    Why do you make all that so complicated? Just use one command line command (or change the target in the shortcut one time):
    Mac (Linux other path): /Applications/Firefox.app/Contents/MacOS/firefox-bin -ProfileManager
    Win: “C:\Program Files\Mozilla Firefox\firefox.exe” -ProfileManager

    Just check http://kb.mozillazine.org/Command_line_arguments.

Feel free to leave a reply to this posting.

Warning! Your comment will be lost if you mistype the spam-test or forget to enter your name or e-mail-address. Copy your comment to the clipboard to be sure.

You may use these tags within your reply: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>