site news archive - firefox user profiles
12th March 2005 - 02:37
I've read a couple of tutorials about firefox extension development recently, How to create Firefox extensions at roachfiend and the Firefox extension tutorial at Gmacker.
Both articles mention the possibility of breaking your firefox install in the process of installing and testing extensions. The roachfiend tutorial suggests using Firefox's safe mode to start it, giving you the chance to uninstall the problem extension. Gmacker says that you should really install a second copy of Firefox, but due to being a lazy programmers guide doesn't, instead they suggest deleting your profile and starting again. The problem with deleting your profile is that you lose all settings, bookmarks, existing extensions etc.
There is a third option, which is the one I use. It seems to be another one of the less well known features that firefox provides. Firefox includes built in support for multiple user profiles, but there's no obvious way to access it. To get started with it you need to run the profile manager giving you the ability to add extra profiles. To access it close all open firefox windows, enter firefox -profilemanager into the windows run box, then click ok. This will then bring up the following window.

From there click the Create Profile... button and follow along in the simple wizard. You shouldn't need to change the profile location, it'll appear in the default profiles directory alongside the default profile that you're already using, just enter a name for the profile. If you're going to be switching or testing with any regularity I would recommend unchecking the "Don't ask at startup" box, this will mean that every time you start Firefox it pops up the manager asking which profile to use. If you don't want it to pop up each time, leave it checked and start Firefox with the -profilemanager switch when you want to choose, I created a shortcut to this for ease of use.

Now you have created the new profile, start Firefox using it, either double click on the profile name or select the profile and click the Start Firefox button. When Firefox opens you should have a plain Firefox window, just as it was when you originally installed it. Using this you can install and test any extensions to your hearts content, without the worry of hosing all your bookmarks, other extensions and any other guff you may have installed into the default profile. If you manage to hose firefox such that it won't start using the new profile, you can either try to remove the extension that caused it using safe mode, or just fire up the profile manager and delete the dead profile.
Oh, and there will be more on the extensions I'm working on coming in future.