Firefox Mandatory Preferences

  1. Important links

Overall Process

  1. We want to create mandatory preferences for Firefox
  2. As an example we are setting
    1. The Firefox homepage to:

    2. The proxy settings to: Auto-detect proxy settings for this network

  3. More settings can be found About:config description of the Mozilla


Determine settings

  • open Firefox
  • go to "about:config"
  • search for "general.config"
    • You will be presented with the default values (these could be changed in /usr/lib/firefox/greprefs/all.js)





  • We now know that the file to create is firefox.cfg. The location for this is the Firefox Application folder.

  • Create a file firefox.txt. It's content will be:

lockPref("network.proxy.type", 4);
lockPref("browser.startup.homepage", "");

NOTE: The two slashes at the first line of the file are important otherwise Firefox won't understand your config file and refuse to start up

  • OPTIONAL: Ubuntu ships with a default firefox.cfg file /usr/lib/firefox/firefox.cfg make a backup of that file

    • sudo cp /usr/lib/firefox/firefox.cfg /usr/lib/firefox/firefox.cfg.dist

  • sudo /usr/lib/firefox/obscure-tool firefox.txt /usr/lib/firefox/firefox.cfg
  • Restart Firefox
    • Go to Edit -> Preferences -> Advanced -> Network -> Settings

    • All values should be greyed out and the selected Value should be Auto-detect proxy settings for this network

    • Go to Edit -> Preferences -> Main

    • The value of the homepage should show - changing that value shouldn't be possible as the field is greyed out.

      • NOTE: The button above is not disabled in this config. A user may very well show a blank page on startup instead of the homepage. But hitting the Home button will take her to the homepage we set.


FirefoxMandatoryPreferences (last edited 2011-04-08 15:28:04 by D9784B24)