Running simultaneous Firefox sessions with different profiles

The more and more I use Firefox, the more add-ons I install, and the heavier it becomes.  Recently I got to the point where I am annoyed by all the heavy weight functionality, but cannot remove it complete because I need it occasionally.

The solution to my problem turned out to be pretty simple, even if it required some Google searching and IRC chatting – multiple profiles.

By default, when you run Firefox for the first time, it created a default profile to store all your stuff – saved passwords, bookmarks, add-ons, etc.  However it is possible to create more profiles and separate things a bit.  For example, I currently have three profiles:

  • Browser.  I use this one for generic browsing stuff, such news reading, email, etc.  Firefox add-ons for Gmail, Google Calendar, YouTube, Flickr, and other major sites I used frequently are installed under this profile.
  • WebDev.  I use this one for my web development needs.  Web Developer, Firebug, Live HTTP Headers, and any other add-ons that help me do my job are installed under this profile.
  • Default.  I keep this one clean and empty.  Sometimes I want to see how  site behaves in the browser with default settings – for this I use the Default profile.

Creating this profiles in very easy.  As per Firefox documentation, all you need to do is close all current Firefox windows, and then run Firefox from command line with -ProfileManager parameter.  A small window will popup that will give you options to create, rename, and delete profiles, as well as select with which profile to start the new session.

The problem that I came across was running several Firefox sessions in parallel, each with its own profile selected.  I could easily select the profile for the first session, but when I was starting up the second session, it would just reuse the same profile from the first session.

The solution to this problem is either setting MOZ_NO_REMOTE environment variable to 1, or specifying -no-remote parameter on the command line.  The -no-remote parameter on the command line seems to be a recent addition to Firefox, so if it doesn’t work yet for your version of the browser, you’ll need to fall back on to the MOZ_NO_REMOTE environment variable.

So, if you have a recent Firefox version, you need to run (updating your desktop and menu shortcuts seems like a good idea):

[user@host dir]$ MOZ_NO_REMOTE=1 firefox -ProfileManager

If you want to start Firefox with specific profile (e.g.: DesiredProfile), you can do so with

[user@host dir]$ MOZ_NO_REMOTE=1 firefox -P DesiredProfile

Alternatively, you can export the variable globally, by adding the following line to your .bashrc file

export MOZ_NO_REMOTE=1

If you have a recent version of Firefox, then the command changes to:

[user@host dir]$ firefox -no-remote -P DesiredProfile

Other things that you might want to keep in mind are:

  • Some add-ons will be common between your different profiles.  For example, I want to have my delicious bookmarks available to me everywhere.  For these cases, you’ll need to install the same Firefox add-on to every profile that you will need it at.
  • Some bits of configuration (such as custom keyboard shortcuts, for example), will need to be configured in each profile separately.
  • You might want to have a different Firefox theme for each of your profiles, so that it’s easier to see where you are visually.

One thought on “Running simultaneous Firefox sessions with different profiles”


  1. Excellent idea :)

    I was just about the switch to Opera or even Chrome. Firefox is eating my precious memory and I cannot stand it anymore.

Leave a Reply to ChrysCancel reply