One of the most-visited articles I’ve written here is one on managing Firefox default settings. I continue to get questions about this, so I thought it was time to revisit the issue.
I still use the basic techniques described in the original article. But I’ve made two changes worth pointing out.
Originally, I edited two existing files and added a third file. But now, I just add two files.
The first file tells Firefox to use your new config file.
Create a new file: /Applications/Firefox.app/Contents/MacOS/defaults/pref/local-settings.js
Edit the contents like so:
// MyOrganization additions
Now the actual configuration file:
Create a new file: /Applications/Firefox.app/Contents/MacOS/firefox_AA.cfg.
For our implementation , the contents are similar to:
// This file sets some default prefs for use at MyOrg
// and locks down some other prefs.
// application updates
// Password Manager
// Default browser check
// Home page
Make sure the first line starts with double slashes as in the example above – if the first line isn’t comment, it doesn’t work.
We’ve moved the homepage settings into our Firefox_AA.cfg file; previously we were editing /Applications/Firefox.app/Contents/MacOS/browserconfig.properties.
Since we’re now dropping in two new files, instead of editing existing files, this is much easier to package up and deploy.
For more information about this technique, and more info on how to find more settings you can manage, check out this mozillaZine article:
Note that in the mozillaZine article, they encode the .cfg file using ROT13. I don’t bother for my deployment, but if you need to obscure the values in the .cfg file, you can. If you do so, be sure to remove the “pref(“general.config.obscure_value”, 0);” line from the local-settings.js file.
If you try this and have problems, make sure the two files are plain text and the names don’t have a hidden extra extension — some people tried using TextEdit with its default settings to make these files and ended up with files named “local-settings.js.rtf” or “local-settings.js.txt”…
14 thoughts on “Firefox default settings revisited”
Amazing! I have just been trying to figure out how to lock down the proxy settings today!
I’ve just tried this with a freshly-downloaded Firefox 3.5.7 on Mac OS X, and it seems to be completely ignoring the settings in the firefox_AA.cfg file. I even followed the Mozilla directions to ROT13-encode the file (and I did remove osbscure_value 0), and that didn’t work either.
Any ideas or helpful pointers?
To follow up, using the old method of modifying the all.js works just fine. It’s only the local-settings.js link that isn’t working for me.
I’ve updated the post. Create your local-settings.js file at /Applications/Firefox.app/Contents/MacOS/defaults/pref/local-settings.js instead of at /Applications/Firefox.app/Contents/MacOS/greprefs/local-settings.js. The MozillaZine article claims either will work, and I posted without testing both locations – it turns out that at least on Mac OS X, that’s wrong and only Firefox.app/Contents/MacOS/defaults/pref/ works.
[…] This may help… https://managingosx.wordpress.com/201…ngs-revisited/ […]
Or you could just try the CCK (Client Customisation Kit) to make a extension in xpi format and install it. users dont see it and cant uninstall it.
I noticed at the bottom of the firefox-AA file that a “); are missing. I’ve added these and continue to get a profile reading error. It won’t load at all.
WordPress may have cut off the ends of some of the lines on display; you’ll need to verify the syntax of your Firefox_AA.cfg file line by line.
[…] I. Configure the Firefox 4.0 Application for your institution’s settings. Note this section is based on Greg Neagle’s article Firefox default settings revisited. […]
[…] Firefox Default Settings Revisited) […]
At least as of version 14 (though perhaps earlier?) the preference: lockPref(“app.update.autoUpdateEnabled”, false); is now lockPref(“app.update.auto”, false);
FYI if you want to disable installing extensions and/or addons you need the following line
Right here is the perfect web site for anyone who hopes to find out about this topic. You know a whole lot its almost tough to argue with you (not that I personally will need to…HaHa). You definitely put a fresh spin on a topic that’s been discussed for decades. Great stuff, just wonderful!
[…] in January 2010 Greg Neagle wrote up a popular article detailing how to set default settings for Firefox. While his article was Mac focused this technique […]
[…] Using the .cfg file is the way to go for sure (I just did the same thing last month on our setups to deploy it). Check your permissions on the cfg and js files and make sure you are pointing at the appropriate cfg file and it should work. Try these instructions, I think this is what I used: Firefox default settings revisited | Managing OS X […]
Comments are closed.