How to run two different Firefox profiles at once on Linux

Have you ever needed to run multiple Firefox profiles at once? On Linux this is actually quite easy to do.

How to run two different Firefox profiles at once on Linux

If you're a Linux user, you're accustomed to flexibility. You might also be a multitasking ninja—developing, admining, managing, or just general usage. Because of the nature of how you use Linux, you might wish you could run two different Firefox profiles at once. For example, say you'd like to use one profile for web development, one for remote work, and one for general browsing. Wouldn't it be nice if this could happen?

It can.

And on Linux, it's actually quite easy. 

Let me show you the way.

SEE: Choosing your Windows 7 exit strategy: Four options (TechRepublic Premium)

What you'll need

  • Firefox installed

  • A text editor

I'll be using Firefox Nightly and the nano editor. If you're using a different version of Firefox, you'll only have to modify the Exec line in the .desktop file to work with your Firefox installation.

How to create a new profile

Before we get into making Firefox such that you can launch multiple profiles, we have to make sure to have, as you might expect, multiple profiles. 

To create a new profile, launch Firefox from a terminal window with the following command: 

firefox --profilemanager

In the resulting window, click Create Profile (Figure A).

Figure A


Creating a new profile in the Firefox Profile Manager.

Click Next in the wizard and then, when prompted, give the new profile a name (Figure B).

Figure B


Naming the new profile.

Click Finish and your new profile is ready.

How to create a profile launcher

We're going to create a separate launcher for the new profile. This new file must live in the ~/.local/share/applications folder. Create the new launcher with the command:

nano ~/.local/share/applications/firefox-NAME.desktop

Where NAME is the name of the new profile you just created. In that file, paste the following contents, modifying to fit your needs/installation:

[Desktop Entry]
Name=Firefox NAME
Exec=firefox -P NAME -no-remote --class NAMEProfile

Where NAME is the name of the new profile.

Save and close the file. 

You should now see a launcher in your desktop menu for the new profile (Figure C).

Figure C


My TechRepublic profile is ready to use.

Congratulations, you can launch your new Firefox Profile and it will run alongside the default. You can create as many profiles as you need, and run all of them simultaneously. Enjoy that newfound Firefox flexibility.

Also see


Image: Mozilla