I often need to run multiple browser sessions simultaneously where each session is isolated from the other.

  • Testing a web page design for multiple logins (Admin, registered, privileged, etc. users)
  • Running a page that tends to crash FireFox (like Flash pages).

Under Linux (Ubuntu in this example) you can do this one of two ways:

1. Create a new user, open a terminal and ssh to that account and firefiox &. This creates a fully isolated session but is a bit tedious.

  • This is the best method for 100% isolation.

2. Create multiple Firefox profiles. This is pretty nifty and works well. There are some tricks I found to making it work.

  • Create a new profile. To do this I had to exit out of FireFox and then: firefox --ProfileManager
    • Create as many as you need with nice unique names. I avoid spaces to make it easier to enter later on.
    • Do NOT share data areas, that could get ugly
    • You can copy bookmarks, or install some bookmark sharing add-on, later if you like
  • Create desktop (or menu) icons per your distribution. For Unbuntu I just right-click on the desktop and Create Launcher
  • The command is usually /usr/bin/firefox and you will need two options. One to use the profile and another to prevent re-using an existing profile.
    • -P _profile-name : Using the EXACT same name as you created above, make sure to use quotes if your profile name has spaces.
    • -no-remote : Prevents the re-use of an existing window, which happens regardless of the -P option
  • So: /usr/bin/firefox -P session-2 -no-remote ** The last step is to edit your current icon/launcher to add the appropriate [email protected] option. Often -P default. Otherwise you will find the wrong session starting up.

The one downside of this #2 is that clicking on the icon a second time generates a warning. This could probably be resolved by creating a little launcher, but I don’t need that right now. I can easily spawn a new window from within Firefox itself.

TODO: A very handy, for me anyway, trick would be to automatically make each desktop its own Firefox session. Especially if I could automatically share/sync bookmarks and passwords.