Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Problem with mozilla.cfg file and getting settings to apply.


Recommended Posts

Posted

OK, I have followed a ton of advice and instructions to get a custom locked down config for FireFox 3.6.8. I changed the all.js file successfully. However, most of the mozilla.cfg settings are applied, but are ignored. Please see the screenshot for an example. I am trying a very simple file to test:

 

//

try {

lockPref("browser.startup.homepage", "http://newsletter.ttc.home/");

lockPref("Privacy.clearOnShutdown.cache", true);

lockPref("Privacy.clearOnShutdown.history", true);

} catch(e) {

// displayError("lockedPref", e);

}

 

http://www.ttc-ms.com/test/images/privacysettings.jpg

 

but as you can see from the screenshot, and in testing, it does not clear the history. The homepage works everytime though, even if I change it.

 

An interesting observation, when I apply the new all.js file and the mozilla.cfg to a fresh install of FF, upon first launch, NONE of the settings are followed. Only AFTER you open and close it the first time does anything work.

Posted

Can you try the following?

 

//
try {
lockPref("browser.startup.page", 1);
lockPref("browser.startup.homepage", "http://newsletter.ttc.home/");
lockPref("privacy.sanitize.promptOnSanitize", false);
lockPref("privacy.sanitize.sanitizeOnShutdown", true); // Always clear my private data when I close Firefox
lockPref("privacy.sanitize.timeSpan", 0); // 0 = Clear everything
lockPref("Privacy.clearOnShutdown.cache", true);
lockPref("Privacy.clearOnShutdown.history", true);
} catch(e) {
// displayError("lockedPref", e);
}

  • Thanks 1
Posted
The line I added in the all.js is

pref("general.config.filename", "mozilla.cfg");

 

I usually add the following two lines to the end of my all.js so that I do not have to keep converting the mozilla.cfg file each time I update it. This makes troubleshooting issues a lot easier and our users are restricted so they can't modify this file anyway. I then copy my unencrypted mozilla.cfg file directly into the Mozilla Firefox folder within Program Files and it just works.

 

[b]pref("general.config.obscure_value", 0);[/b]
pref("general.config.filename", "mozilla.cfg");

 

 

This might be worth a try since it will help to eliminate any issues with the conversion of the mozilla.cfg file.

  • Thanks 1
Posted

I just had another look at my mozilla.cfg file and noticed I do not have \\ before displayError. This might be worth removing too perhaps?

 

//
try {
lockPref("browser.startup.page", 1);
lockPref("browser.startup.homepage", "http://newsletter.ttc.home/");
lockPref("privacy.sanitize.promptOnSanitize", false);
lockPref("privacy.sanitize.sanitizeOnShutdown", true); // Always clear my private data when I close Firefox
lockPref("privacy.sanitize.timeSpan", 0); // 0 = Clear everything
lockPref("Privacy.clearOnShutdown.cache", true);
lockPref("Privacy.clearOnShutdown.history", true);
} catch(e) {
displayError("lockedPref", e);
}

Posted

Thank you for your help on this, but it is still not working. I put your lines in

 

pref("general.config.obscure_value", 0);

pref("general.config.filename", "mozilla.cfg");

 

at the bottom of the all.js file, but now it wont see the mozilla.cfg AT ALL. When I took out the line

pref("general.config.obscure_value", 0); I got it back to seeing the correct homepage, but no sanitize or other settings. What am I missing?

 

BTW- This is being tested on 3.6.8

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...