Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

What happened to mozilla.cfg?

  • 9 replies
  • 1 has this problem
  • 64 views
  • Last reply by cor-el

more options

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?

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?

Chosen solution

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
Read this answer in context 👍 2

All Replies (9)

more options

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.

more options

Chosen Solution

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
more options

Works like a charm, thanks for the info.

more options

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.

more options

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

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

more options

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::prefcalls.js::defaultPref::line 85" data: no]

more options

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?

more options

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

more options

Make sure to have quotes around the pref name:

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