Firefox Mandatory Preferences
- Important links
- obscure-tool is in the firefox-dev package "sudo apt-get install firefox-dev"
- We want to create mandatory preferences for Firefox
- As an example we are setting
The Firefox homepage to: https://help.ubuntu.com/community/FirefoxMandatoryPreferences
The proxy settings to: Auto-detect proxy settings for this network
More settings can be found About:config description of the Mozilla
- 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", "https://help.ubuntu.com/community/FirefoxMandatoryPreferences");
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 https://help.ubuntu.com/community/FirefoxMandatoryPreferences - 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.