Running Multiple Firefox sessions

As developers we come across the problem of accessing the same site with two or more different logins every so often. Problem is that if you are using Firefox the session cookies are shared across all running browsers. This means that you either run different browser applications or keep deleting session cookies and keep logging in, not really ideal.

Firefox does provide the ability to create multiple profiles, however the sessions are still shared between the browser. To fix this you need to add the option -no-remote this enables running multiple instances of the application with different profiles;

The steps below will allow you to run as many seperate Firefox sessions as you feel necessary.

  1. Using the following command firefox -no-remote -ProfileManager & to start a new Firefox instance.
  2. Create as many new profiles as you think you will need. Call them something useful, e.g. Session1, Session2, etc. Then close the Profile manager.
  3. Update the short-cut for your Firefox by adding the option -no-remote
  4. Create new short-cuts for the other sessions e.g. firefox -no-remote -P Session1

For more details of Mozilla command-line options visit http://kb.mozillazine.org/Command_line_arguments

Trackback URL for this post:

http://www.func.nl/trackback/93

Tried this but doesnt work - Ver 3.6

Hello there -

I have multiple gmail accounts and instead of signing in and out, I like the idea of having multiple windows, each managing a separate session.

I tried the steps above with firefox 3.6, but it errors out on opening the 3rd session. Sometimes it'll error on opening the 2nd session itself.

Error - "Firefox is already running but not responding. To open a new window, you must first close the existing Firefox process, or restart your system"

Solved it

Never mind my earlier post....I was assigning the same folder to each profile, which was incorrect. Each Profile needs its own independent folder and then it works fine.

To create a new Session every

To create a new Session every time you start firefox I've created a little script:

- first create a new profile and name it template
- create a script:

#!/bin/bash
export TMP="/tmp/FIREFOX-SESSION-"`date +"%N"`
cp -rf "/home/martin/.mozilla/firefox/template" $TMP
firefox --no-remote --profile "$TMP"

Could something like UnionFS

Could something like UnionFS help you out here? You wouldn't have to copy your profile every time, and you'd have copy-on-write functionality (which you might or might not want). Mount points could be problematic, but it might be an interesting idea.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]".