cancel
Showing results for 
Search instead for 
Did you mean: 

What happened to mozilla.cfg?

SOLVED
Highlighted
New Contributor

What happened to mozilla.cfg?

The last SMS package I created for Firefox was 6.0.2 so my apology if this is old news. From what I understand user.js replaced mozilla.cfg? What about lockpref, is their an equivalence? I'm also a little puzzled as to how one is suppose to use "browser.startup.homepage_override.mstone" or "browser.shell.checkDefaultBrowser" within user.js when the location it's suppose to be in doesn't exist untill the application is executed. Am I missing something?

1 ACCEPTED SOLUTION

Accepted Solutions
Site Moderator

Re: What happened to mozilla.cfg?

See also:

Use a mozilla.cfg file in the Firefox program folder to lock prefs or specify default values.
Place a file local-settings.js in the defaults\pref folder where you also find the file channel-prefs.js to specify using mozilla.cfg.

pref("general.config.filename", "mozilla.cfg");
pref("general.config.obscure_value", 0); // use this to disable the byte-shift

You can use these functions in mozilla.cfg:

defaultPref();  // set new default value
pref();         // set pref, but allow changes in current session
lockPref();     // lock pref, disallow changes
9 REPLIES
Senior Contributor

Re: What happened to mozilla.cfg?

The last time I checked (for firefox 8) mozilla.cfg and lockpref were still working. Why do you think that they no longer work? user.js and mozilla.cfg are two different things, so user.js could never replace mozilla.cfg.

Site Moderator

Re: What happened to mozilla.cfg?

See also:

Use a mozilla.cfg file in the Firefox program folder to lock prefs or specify default values.
Place a file local-settings.js in the defaults\pref folder where you also find the file channel-prefs.js to specify using mozilla.cfg.

pref("general.config.filename", "mozilla.cfg");
pref("general.config.obscure_value", 0); // use this to disable the byte-shift

You can use these functions in mozilla.cfg:

defaultPref();  // set new default value
pref();         // set pref, but allow changes in current session
lockPref();     // lock pref, disallow changes
New Contributor

Re: What happened to mozilla.cfg?

Works like a charm, thanks for the info.

New Contributor

Re: What happened to mozilla.cfg?

We are having a similar problem after installing Firefox 13.0. After the installation it no longer recognizes one of the settings in the mozilla.cfg used to set configurations for the DoD STIGs. just get an error now when firefox starts. When I remove mozilla.cfg I dont get an error, but I still do not have settings locked down.

Site Moderator

Re: What happened to mozilla.cfg?

Which line(s) in the mozilla.cfg file are causing that problem?

Does the file work if you remove that not working line?

New Contributor

Re: What happened to mozilla.cfg?

the exception thrown does not point to any particular line in the mozilla.cfg file. I removed the line to load the pref("general.config.obscure_value", 0); which keeps the mozilla.cfg from loading all together, but I have not tried to comment each line in the mozilla.cfg yet. I will give that a try. the error is Netscape.cfg/AitpConfig failed. Please contact administrator. Error defaultPref failed[exception..."Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsPrefBranc.setCharPref]" nsresult "0x8000ffff NS_ERROR_UNEXPECTED)" locatipon"JSFrame:Smiley Tonguerefcalls.js::defaultPref::line 85" data: no]

Site Moderator

Re: What happened to mozilla.cfg?

This error can be caused by trying to change/set a no longer supported (String) pref.

Do you see all prefs that you want to set on the about:config page?

New Contributor

Re: What happened to mozilla.cfg?

Great suggestion, however all of the setting were supported. Of about 15 setting, I ended up finding one that caused the exception. This was very strange, since the setting did show up in about:config. I ended up diableing each and every line in the mozilla.cfg file until I found the error. The Problem ended up being an incidious syntax error! For some reason I had quotes around the value on just that one entry. on all version of Firefox up through version 12.0 all ignored the quotes, but when we installed 13.0 last week, it choked on the quotes. For the DoD STIG Vulnerabiltiy ID V0015770 I had : lockPref("network.protocol-handler.external.shell, "false"); It should have been lockPref("network.protocol-handler.external.shell, false);

Thanks for the suggestion.

v/r Dave Tersigni CISSP

Site Moderator

Re: What happened to mozilla.cfg?

Make sure to have quotes around the pref name:

  • lockPref("network.protocol-handler.external.shell", false);