Using multiple Firefox profiles

Adam Victor Brandizzi
6 min readAug 25, 2016

--

(Translated from http://suspensao.blog.br/descrenca/usando-diferentes-perfis-no-firefox/)

People are coming back to Firefox. Excellent! However, the prodigal sons can be disappointed. Firefox, I’m sorry to say, is heavyweight and unstable. Fortunately, there are way to alleviate those issues. One of them is to use different profiles.

Creating profiles by using the ProfileSwitcher extension is simple. After installing it, to to the “File” menu, option “Open profile manager” and choose “Normal mode.” It will ask if you want to close the current profile; answer “no.” The screen below will appear:

The screenshot already show two profiles. The first one, “default,” is the one I use for most of my tasks: e-mail, social networks, MOOCs etc. At first, I just had this profile, and it always had two, three hundred open tabs. The browser invariably crashed. A good part of those tabs were about programming and were related to personal projects. So, I created another profile, “Dev.” It is the one I use to work on my projects.

Now, suppose I have to solve some work-related problems at home. Naturally, I want to avoid proliferating tabs. So, I’ll create another profile. I click in “Create Profile,” and a somewhat scary screen will appear:

No worries, though: just click in “Next” and the screen below will appewar. There, we give a name to the new profile — in this case, let’s call it “Work.”

And voilà! a new Firefox window will open.

Advantages of multiple profiles

This new window runs on a different process. As a consequence, I am not logged in on most sites. This is an advantage: now I can authenticate into two different e-mail accounts…

…or, how I’m used to do with my “Dev” profiles, I can use two Twitter accounts — a personal one and a more professional one.

Regarding stability, there are at least two wins. Since each profile is a separate process, if one crashes the other one will keep working. One gets even more confident to restart the browser: if a window gets too slow, I kill it.

Also, the tabs end up split between two processes. The three hundred tabs open in my browser are now a hundred in each profile. It requires more resources, but the operating system can handle that — Firefox, no.

Also, profiles help to focus. When I’m on my “Dev” profile, there is no news or friends distracting me: I only write code and research. On the other hand, on my work profile there are only professional sites.

Syncing profiles

It is useful to share some information between profiles — for example, the history. Privacy concerns aside, Firefox Sync is a good tool for that. One just needs to go to the “Edit” menu, “Preferences” submenu; on the new open tab, choose “Sync” at the left sidebar.

The first time you set up Sync, you’ll need to create an account. Enable the “Choose what to synchronize” option, so you will decide what will be sent to Mozilla’s servers.

You will receive an email. There will be a link in it to confirm your account. Click on it. After that, just return to the Sync Preferences for configuring details. In my new profile, I’ll disable synchronization for tabs, bookmarks and passwords, just because I prefer so. I also like to give a meaningful name for the device, identifying the machine and the profile.

Moving tabs between profiles

Sync is also good to send tabs to other profiles and devices. For example: sometimes an interesting article about Brazilian politics appears on my technical timeline on Twitter. I don’t read it then; instead, I send it to my personal profile. Other times, while researching something in the workplace, I find an interesting but unrelated link. To not get distracted, I send it to my “Dev” profile at home.

This can be done with the Send Tab to Device extension. Once installed, just right-click in any empty part of the site: at the end of the context menu there will be the “Send Tab to Device” option:

A dialog box listing all profiles, from all machines, will appear. You choose one and click in “OK.” The tab will open at the other profile soon.

It is not even necessary to open the tab. You can right-click in a link and send it to another device. Great way to avoid the Wikipedia problem:

Bonus points: listing profiles at the Ubuntu launcher

In practice, I never use ProfileSwitcher: I prefer to open profiles directly from Firefox’ launcher. Guided by this wiki page, it was easy configure that with Ubuntu.

First, we copy /user/share/applications/firefox.desktop to ~/.local/share/applications/firefox.desktop. There, we look for this line:

Actions=NewWindow;NewPrivateWindow;

We will add an option to this line. It can have any name, so let’s call it OpenWorkProfile. Note the semicolon at the end of the line.

Actions=NewWindow;NewPrivateWindow;OpenWorkProfile;

Done, the action is declared. Now we just need to add the following lines to the end of the file:

[Desktop Action OpenWorkProfile]
Name=Open the "Work" profiler
Name[pt_BR]=Abrir perfil "Work"
Exec=firefox -no-remote -profile Work
OnlyShowIn=Unity;

The first two lines define the name to appear in the menu — in this case, in English and Portuguese. Then, the Exec command instructs Firefox to be called with the options -no-remote (so the new window will be a different process) and -profile (followed by the name of the profile to be used).

Finally, we call “sudo update-desktop-database.” The launcher’s context menu will be updated. To see it, right-click on the Firefox icon and the actions will be listed.

In practice, I also added an action for the development profile. And there is other to open the profile manager, so I can create new profiles or choose one from the list. You can see how I did it on the complete file.

I don’t know how to do this in Windows or Mac OS but I’m sure it is possible, and maybe not even complicated.

It is a shame that Firefox’ interface would not favor more the use of profiles. Yet, after a bit of work, it is even easy to use profiles. When the excitement about Firefox wanes and the instability becomes insurmountable, think about using them.

--

--

Adam Victor Brandizzi

Software developer and Time Lord at Liferay. Also found at @brandizzi