Tuesday, June 08, 2010

Lock Down Firefox Preferences on Ubuntu Lucid With a New firefox.js File

In the past couple of weeks we've received 105 donated computers. Dell GX260/270 towers, P4's all, 512MB-1GB of RAM and decent specs otherwise. This has dramatically shifted my vision for the technology infrastructure of the Academies. We no longer have to worry about utilizing underpowered Pentium 3 machines any longer, which means the need for LTSP and all its advantages is gone as well.

LTSP is, in my opinion, an elegant but troublesome solution. Without consistent and frequent monitoring there are simply too many ways for individual workstations to stop functioning. Of course, when a breaker flips, a student accidentally kicks a surge protector strip off, or someone knocks out the switch the whole thing comes to a crashing halt.

Therefore, I've recently begun building several images of both Windows XP (for our Rosetta Stone utilizing teachers) and Ubuntu Lucid for the various machines we have on campus. I'm hoping to find the time to put together a complete "From Square One" guide to locking down the Ubuntu desktop (as I've done it a few times already this week), but for now I thought I'd share a particularly useful bit of code, following up from a previous post of mine.

Some of the old firefox.js settings no longer work, but I've managed to fix all of them and add a couple more that I like. I think the descriptions are mostly adequate to see what I'm attempting, but if you have any questions drop a comment and I'll reply. Cheers! -Joe

As before, this is the firefox.js file located in etc/firefox/pref/

// This is the Debian specific preferences file for Mozilla Firefox
// You can make any change in here, it is the purpose of this file.
// You can, with this file and all files present in the
// /etc/firefox/pref directory, override any preference that is
// present in /usr/lib/firefox/defaults/pref directory.
// While your changes will be kept on upgrade if you modify files in
// /etc/firefox/pref, please note that they won't be kept if you
// do them in /usr/lib/firefox/defaults/pref.

pref("extensions.update.enabled", true);

// Use LANG environment variable to choose locale
pref("intl.locale.matchOS", true);

// Disable default browser checking.
pref("browser.shell.checkDefaultBrowser", false);

// Prevent EULA dialog to popup on first run
pref("browser.EULA.override", true);

// identify default locale to use if no /usr/lib/firefox-addons/searchplugins/LOCALE
// exists for the current used LOCALE
pref("distribution.searchplugins.defaultLocale", "en-US");

// Enable the NetworkManager integration
pref("toolkit.networkmanager.disable", false);

// Other preferences

user_pref("browser.startup.homepage", "http://www.aeacs.org");

user_pref("startup.homepage_override_url", "http://www.aeacs.org");

user_pref("startup.homepage_welcome_url", "http://www.aeacs.org");

pref("browser.startup.homepage_reset", "http://www.aeacs.org");

pref("privacy.sanitize.sanitizeOnShutdown", true);

pref("privacy.sanitize.promptOnSanitize", false);

pref("privacy.clearOnShutdown.offlineApps", true);

pref("privacy.clearOnShutdown.passwords", true);

pref("privacy.clearOnShutdown.siteSettings", true);

pref("privacy.clearOnShutdown.history", false);

pref("privacy.clearOnShutdown.downloads", false);

pref("signon.rememberSignons", false);

pref("browser.tabs.warnOnClose", false);

4 comments:

stlouisubntu said...

Hey friend! Thanks for sharing this. I have a custom remix for donated PCs going to families who need them. I also want to change the default home page and your first two lines helped me to implement that. However, I still want the user to be able to change it to what they want and your two lines do not allow it to be changed (keeps reverting if one tries to change it manually.) Any advice or assistance you can provide would be much appreciated.

Joseph Hartman said...

Hi,

You can try messing with some of the settings in Firefox. You can access them by typing "about:config" in the address bar. There may be something in there to help you. Otherwise I would guess you could just create the homepage you want in your master image without specifying it in the firefox.js file and then create your image from that. I guess it would depend on how you are creating your custom image. I use Clonezilla myself, so just specifying the homepage once would do the trick.

jslim28 said...

That's easy. I have another friendly guide for you at http://jslim28.blogspot.com/2011/10/locked-preferences-in-firefox-3-on.html

jslim28 said...

That's easy. I have another friendly guide for you at http://jslim28.blogspot.com/2011/10/locked-preferences-in-firefox-3-on.html