In a Firefox installation, users settings such as bookmarks, add-ons, preferences, etc, are stored as one profile. In normal usage, a default profile is created. When you launched Firefox from the menu or panel icon, you are actually using the default profile. Even when you opened a second Firefox window, the same profile is used.
However, an advanced user might find it useful to have more than one profile.
Note:
This post is about Firefox 3 in Ubuntu (specifically, I am using Ubuntu Intrepid Ibex). If you have another version of Firefox, Ubuntu or another operating system altogether, the concept of Firefox profiles should still be the same. However, the commands, screen captures, etc, might be slightly different.
Why have separate profiles
Each Firefox instance opened with a separate profile would not be sharing user settings, browsing history, file caches and cookies. This complete separation is probably better for security and privacy. At the very least, knowing more about profiles would allow you to better control, back-up and migrate your Firefox settings.
I used the default profile for general web surfing. I have another profile for accessing secure sites like banking and financial websites. In the second profile, I enabled settings which increase security (but at the expense of convenience).
Creating a second profile
First, close all instances of Firefox before continuing, else this would not work.
Open a terminal, and enter this command:
firefox -ProfileManager

As you can see from the screenshot above, there is already a profile called “default”.
Click “Create Profile”.

Click “Next”, and enter a name for the new profile you are creating. For this example, I will use “secure”.

Click “Finish”. The new profile is created.

Have Firefox ask you every time
If you unselect “Don’t ask at startup”, Firefox will ask you for the profile to use every time. This is convenient if you frequently switched profiles. However, you can only use one profile at a time. To use both profiles simultaneously, you would need another method.
Note:
If you keep “Don’t ask at startup” selected, the last profile highlighted in the Profile Manager window will be used.
Opening with profiles directly (and simultaneously)
To do so, use command line options “p” and “no-remote”.
Continuing with the example thus far, to open the “default” profile directly:
firefox -p default -no-remote
And to open the “secure” profile directly:
firefox -p secure -no-remote
The “no-remote” option is essential for this to work. Without this option, you would not get a second instance of Firefox with another profile. Instead, you get a new window with existing profile.
Copying profiles
Before proceeding any further, close all Firefox instances. Copying profiles is useful if you want to start customising the newly created profile from an existing profile, rather than from the default Firefox settings.
To copy a profile, simply copy all files and subdirectories associated with the profile. These are located under “~/.mozilla/firefox/”.
cd ~/.mozilla/firefox/
Example of profile directories (the first 8 characters before the period are randomly assigned, and yours will be different):
$ ls ce3pyoet.default n7vo1628.secure profiles.ini
Copying from “default” to “secure”:
rm -rf n7vo1628.secure/ cp -r ce3pyoet.default n7vo1628.secure
Again, your actual profile directories would be different.
You should now realised the same “copying of profiles” could be done across Firefox installation on different PCs. Hence, this is a direct way to back-up or restore entire Firefox user’s settings.
More information
More information about Firefox profiles can be found here.

Post a Comment