Firefox Customization File

There is a fair amount of documentation available about how to create a Firefox customization file scattered across the internet. Mozilla even publishes all the settings in their documentation. However, I found examples to be sparse, so I’m posting the file I created here for my own reference.

There are two “levels” of customization…user specific and computer wide. User specific settings are stored in the user’s profile (Linux: ~/.mozilla/firefox/*.default/prefs.js, Windows: %USERPROFILE%\Mozilla\Firefox\*_default\prefs.js). Computer wide settings, i.e. they will be applied to all users of the computer who launch Firefox, are stored in system directories…Linux (CentOS 6.3 in my case): /usr/l/usr/lib64/firefox/defaults/preferencesib64/firefox/defaults/preferences/your_site.js, Windows: %PROGRAMFILES%\Mozilla\Firefox\defaults\preferences\your_site.js.

For user preferences, the contents of the file contain lines like the following:

Which changes my startup page from the default to Google. For a computer wide setting, the “command” changes to:

Notice that instead of user_pref, it’s now simply pref. The difference is that the former still allows users to override the setting, the latter is not able to be changed by the user. This is useful as a desktop administrator for enforcing settings…just make sure the permissions are set correctly on the file.

If you are unsure what the preference name for something is, there are a couple of different ways to go about finding which setting affects the browser. All of the settings can be viewed by going to about:config and looking for the bold settings. That indicates they have been changed. However, I still find that difficult to navigate. So, I will usually locate my user preference file and copy it to my desktop (or some other handy place). I then modify the setting in the GUI and compare the old user_prefs.js to the current one.

Once your settings are in the file, save it, check the permissions (again!), and then restart Firefox. You can verify through the GUI or about:config that the settings reflect your preferences file.

Here is my file:

Leave a Reply