Killring Rick Dillon's Weblog

Using Profiles in Firefox

Since Google has released Chrome, its minimalistic, speed-oriented approach has attracted millions of users, both among neophytes and professionals alike. It's a well-designed browser with lots to love. But I still use Firefox, and many folks I work with don't understand why. One of Firefox's killer features is profiles. Many users are aware that Firefox supports profiles, but don't make use of them in their everyday use of the browser. But there are several instances where they can prove to be quite useful. <!--more-->

Working with Profiles

Creating a new profile is a simple matter. If you're invoking Firefox from the command line you can use the -p option to select a profile. For example, if I wanted to select the Personal profile, I would do so with

firefox -p Personal

If a profile named Personal didn't exist yet, Firefox would bring up the profile management dialog, which would allow me to create it.

One of common problems working with profiles is that Firefox tends to (by default) want to attach to a running session of itself when it is invoked. That makes it tricky to run multiple profiles simultaneously. You can avoid this behavior by using the --no-remote option, which prevents the new instance of Firefox from connecting to an already running process. So, the full command line to bring up Firefox with a given profile is:

firefox -p <profile-name> --no-remote

Maintaining Multiple Workspaces

So, what are profiles useful for? One situation I find them useful is at work. I often need to log into the same site, but with two different accounts. One excellent use of "Private Browsing" or "Incognito" modes is to provide a quick way to create empty profiles on-the-fly that are then thrown away when they are closed. This is great if someone is going to borrow your computer to log into GMail, for example, but if you are going to maintain multiple personas on a particular site, Firefox's profiles are often better. In my case, I like to keep my personal GMail account open in one profile and my Google Apps account for work open in another.

But logging into the same site with different credentials is only one benefit of this approach. You also get distinct sets of bookmarks, history and add-ons. So, for my work profile, my bookmarks and history all relate to things I do for work. All my GitHub projects for work are bookmarked and autocompleted perfectly, and there is no pollution of my GitHub history in my work profile with projects on GitHub I would check out for side projects.

Likewise, I use certain add-ons for my personal profile that I don't use in my work profile, like my TT-RSS add-on and LessChrome HD, which hides the address bar and bookmarks bar until I need it. Likewise, Firebug and other development-related add-ons reside only in my work profile.

Create 'Apps' From Websites

Sometimes there are sites that I use so frequently that they become apps in their own right. This idea has been explored extensively by all major browsers, and Firefox has made several attempts at streamlining the process of sandboxing sites into applications, all of which are now defunct as far as I know. Nevertheless, there are some sites that I treat like applications and like to launch and shutdown independently of all my other tabs. Often, I like to run these sites in fullscreen, or at least turn off the menu bar, tab bar and address bar to maximize my screen usage. By sandboxing these pages into a separate Firefox profile, each 'app' can have its own Firefox UI settings and add-ons and can be launched independently of whatever other browsing sessions I have going on.

My primary use case for this is my RSS reader (a private instance of TT-RSS), which runs pseudo-fullscreen and has its homepage set appropriately. To launch it (I use Linux), I simply wrote a shell script and put it in my path:

$ cat ttrss

#!/usr/bin/env bash
firefox -p ttrss --no-remote

This script could be attached to a desktop icon, menu item or other shortcut, but I launch it using Synapse. In the absence of Prism, and Chromeless (both of which are around, but unmaintained), I find that Firefox profiles is an effective replacement.