Stanley Shilov

How to: Running Multiple Firefox Instances

Posted on Sunday, November 9th, 2008 under Tutorials

Setting up multiple instances of Firefox is a 5 minute task which is made possible by the creation of separate profiles, whereby each instance of Firefox will use its own profile. A few key points about profiles:

  • Every profile has its own set of bookmarks, extensions, themes and browsing history.
  • If one instance of Firefox crashes, it will not bring down other instances of Firefox running under different profiles.
  • The only thing shared between profiles are the plugins (Java, Flash, etc).
  • Separate profiles can be used to run different versions of Firefox at the same time.

Here’s how it’s done:

  1. Launch the profile manager to create a new profile:
    “C:\Program Files\Mozilla Firefox\firefox.exe” -profilemanager

    Firefox Profile Manager

    Make sure you close all current instances of Firefox otherwise it will simply open a new window instead of the manager.

  2. Create a new profile. I would recommend using a single lowercase word.
  3. Modify your Firefox shortcut to look like this:
    “C:\Program Files\Mozilla Firefox\firefox.exe” -P “profile-name”

    Firefox Shortcut Profile -no-remote

  4. Now that you’ve setup separate profiles, you still need to tell Firefox to run them independently of one another, by adding the “-no-remote” option to one or both of your shortcuts:
    “C:\Program Files\Mozilla Firefox\firefox.exe” -P “profile-name” -no-remote

-no-remote allows you to run multiple profiles simultaneously, otherwise any new request to open a Firefox window will simply attach the window to the profile that’s already running.
-no-remote
effectively tells Firefox to open an independent instance of the indicated profile.

The disadvantage of theĀ -no-remote option is that it limits you to one instance of a profile at any given time, so clicking twice on a Firefox shortcut that has the -no-remote parameter will give you the following error.

Firefox Instance already running

Getting around this is fairly simple: only add -no-remote to the profile that you expect to use less often.

Tags:

You can leave a response, or trackback from your own site.
  1. Jack Harris Says:

    Thanks for this Stanley. Do you know how to copy one profile to another?

  2. How to build Firefox 3.5+ with JSSH on Ubuntu 9.10 64bit – Stanley Shilov – Web Development, SEO and SEM - Blog Archive Says:

    [...] from any existing Firefox installation you might have already had. I would recommend creating a separate Firefox profile to use for this [...]

  3. dchuk Says:

    You’ll be my hero if you can make this all happen in Ruby and extend the Browser.new function to allow you to choose a profile upon launch…

  4. dchuk Says:

    So I finally started digging…apparently, if you just pass a :profile => “example_profile” to the browser.new function, it should load that profile. This would be perfect if coupled with a script that checked to see if a profile existed for whatever app you’re running, and if it doesn’t exist, creates a basic one, then continues on to launching the browser.

    # Description:
    # Starts the firefox browser.
    # On windows this starts the first version listed in the registry.
    #
    # Input:
    # options – Hash of any of the following options:
    # :waitTime – Time to wait for Firefox to start. By default it waits for 2 seconds.
    # This is done because if Firefox is not started and we try to connect
    # to jssh on port 9997 an exception is thrown.
    # :profile – The Firefox profile to use. If none is specified, Firefox will use
    # the last used profile.
    # :suppress_launch_process – do not create a new firefox process. Connect to an existing one.

    # TODO: Start the firefox version given by user.

  5. Jayapal Chandran Says:

    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?

Leave a Reply



»
© 2012 Stanley Shilov   |   Blog   |   Contact

divide et impera

Stanley Shilov