Mozilla Firefox autoconfig

Firefox - Autoconfig

Posted By: pmietlicki

Published to Work on Jun 16, 2015

Configuration file

Create the config file (.cfg) where the firefox binary (or executable) is located, for example, firefox.cfg
Under Linux : /usr/lib/firefox/
Under Windows : C:\Program Files (x86)\Mozilla Firefox
Under OSX : /Applications/

The important values to centralize the configuration are :


Some information about these values could be found on :

Enable the configuration

You'll have to find the global settings for firefox, the default one for the system.

Under Linux : /etc/firefox/syspref.js
Under Windows : C:\Program Files (x86)\Mozilla Firefox\default\pref\autoconfig.js (create it)
Under OSX : /Applications/ (create it)

Change it by adding these 2 lines :

pref("general.config.obscure_value", 0);
pref("general.config.filename", "firefox.cfg");

The first line "obscure_value" means that you don't want the file to be encrypted (disable byte shifting).

The centralized configuration

It is the file that will be read and load by firefox each time you launch it. You can set a lot of information or actions inside it, for example to change the home page, you can do :

// Set default homepage - users can change 
lockPref("", 1); 
lockPref("browser.startup.homepage", "");

Debugging autoconfig

To be sure that the configuration file is really loaded, you can launch firefox in debug mode with this command :

cat debug.log

If the debug.log file is empty that means that the autoconfig is not functional. You should at least see something like that :

1359808640[7f0badb38580]: general.config.filename = firefox.cfg
-1359808640[7f0badb38580]: evaluating .cfg file firefox.cfg with obscureValue 0
-1359808640[7f0badb38580]: running MCD url

Tags: autoconfig, firefox