为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Issues creating mozilla.cfg file

  • 3 个回答
  • 1 人有此问题
  • 22 次查看
  • 最后回复者为 cor-el

more options

Hi all,

I'm having issues with firefox being able to use my Mozilla.cfg file settings. I receive a "Failed to read the configuration file. Please contact your system administrator." error when attempting to use my configuration.

I created the local-settings.js file referencing the Mozilla.cfg file.

Here are the contents of the Mozilla.cfg file.

// lockPref("app.update.enabled", false); lockPref("app.update.interval", 1273520281); lockPref("browser.download.dir", "N:"); lockPref("browser.download.downloadDir", "N:"); lockPref("browser.formfill.enable", false); lockPref("browser.search.update", false); lockPref("browser.search.update.interval", 1273520281); lockPref("browser.sessionstore.privacy_level", 2); lockPref("browser.shell.checkDefaultBrowser", false); lockPref("browser.startup.homepage", ""); lockPref("browser.tabs.remote.autostart", true); lockPref("browser.tabs.remote.force-enable", true); lockPref("browser.urlbar.autocomplete.enabled”, false); lockPref("dom.disable_open_during_load", true); lockPref("dom.disable_window_move_resize", true); lockPref("dom.disable_window_status_change", true); lockPref("dom.disable_window_flip", true); lockPref("dom.disable_window_open_feature.status", true); lockPref("dom.event.contextmenu.enabled", false); lockPref("dom.ipc.plugins.hangUITimeoutSecs", 30); lockPref("dom.max_script_run_time", 15); lockPref("extensions.blocklist.enabled", false); lockPref("extensions.update.enabled", false); lockPref("extensions.update.interval", 1273520281); lockPref("general.smoothScroll", false); lockPref("image.mem.surfacecache.max_size_kb", 102400); lockPref("network.protocol-handler.external.shell", false); lockPref("plugin.disable_full_page_plugin_for_types", "application/pdf, application/doc, application/xls, application/bat, application/ppt, application/mdb, application/mde, application/fdf, application/xfdf, application/lsl, application/lso, application/lss, application/iqy, application/rqy, application/xlk, application/pot, application/pps, application/dot, application/wbk, application/ps, application/eps, application/wch, application/wcm, application/wbi, application/wb1, application/wb3, application/rtf, application/ad, application/adp, application/xlt, application/dos, application/wks"); lockPref("privacy.sanitize.promptOnSanitize", false); lockPref("privacy.sanitize.sanitizeOnShutdown", true); lockPref("privacy.sanitize.timeSpan", 40); lockPref("security.default_personal_cert", "Ask Every Time"); lockPref("security.enable_ssl2", false); lockPref("security.enable_ssl3", false); lockPref("security.enable_tls", true); lockPref("security.tls.version.max", 3); lockPref("security.tls.version.min", 1); lockPref("security.warn_leaving_secure", true); lockPref("signon.prefillForms", false); lockPref("signon.rememberSignons", false); lockPref("xpinstall.whitelist.required", true);

Any thoughts on what I might be missing? I don't think I made any formatting errors. I've tried it in ESR 52.2.1 and Release 51 without any success.

Hi all, I'm having issues with firefox being able to use my Mozilla.cfg file settings. I receive a "Failed to read the configuration file. Please contact your system administrator." error when attempting to use my configuration. I created the local-settings.js file referencing the Mozilla.cfg file. Here are the contents of the Mozilla.cfg file. // lockPref("app.update.enabled", false); lockPref("app.update.interval", 1273520281); lockPref("browser.download.dir", "N:"); lockPref("browser.download.downloadDir", "N:"); lockPref("browser.formfill.enable", false); lockPref("browser.search.update", false); lockPref("browser.search.update.interval", 1273520281); lockPref("browser.sessionstore.privacy_level", 2); lockPref("browser.shell.checkDefaultBrowser", false); lockPref("browser.startup.homepage", ""); lockPref("browser.tabs.remote.autostart", true); lockPref("browser.tabs.remote.force-enable", true); lockPref("browser.urlbar.autocomplete.enabled”, false); lockPref("dom.disable_open_during_load", true); lockPref("dom.disable_window_move_resize", true); lockPref("dom.disable_window_status_change", true); lockPref("dom.disable_window_flip", true); lockPref("dom.disable_window_open_feature.status", true); lockPref("dom.event.contextmenu.enabled", false); lockPref("dom.ipc.plugins.hangUITimeoutSecs", 30); lockPref("dom.max_script_run_time", 15); lockPref("extensions.blocklist.enabled", false); lockPref("extensions.update.enabled", false); lockPref("extensions.update.interval", 1273520281); lockPref("general.smoothScroll", false); lockPref("image.mem.surfacecache.max_size_kb", 102400); lockPref("network.protocol-handler.external.shell", false); lockPref("plugin.disable_full_page_plugin_for_types", "application/pdf, application/doc, application/xls, application/bat, application/ppt, application/mdb, application/mde, application/fdf, application/xfdf, application/lsl, application/lso, application/lss, application/iqy, application/rqy, application/xlk, application/pot, application/pps, application/dot, application/wbk, application/ps, application/eps, application/wch, application/wcm, application/wbi, application/wb1, application/wb3, application/rtf, application/ad, application/adp, application/xlt, application/dos, application/wks"); lockPref("privacy.sanitize.promptOnSanitize", false); lockPref("privacy.sanitize.sanitizeOnShutdown", true); lockPref("privacy.sanitize.timeSpan", 40); lockPref("security.default_personal_cert", "Ask Every Time"); lockPref("security.enable_ssl2", false); lockPref("security.enable_ssl3", false); lockPref("security.enable_tls", true); lockPref("security.tls.version.max", 3); lockPref("security.tls.version.min", 1); lockPref("security.warn_leaving_secure", true); lockPref("signon.prefillForms", false); lockPref("signon.rememberSignons", false); lockPref("xpinstall.whitelist.required", true); Any thoughts on what I might be missing? I don't think I made any formatting errors. I've tried it in ESR 52.2.1 and Release 51 without any success.

所有回复 (3)

more options

I notice an Unicode quote in the file that is a likely cause:

  • lockPref("browser.urlbar.autocomplete.enabled, false);

Note that you have a lot of prefs in the file that aren't supported for quite some time in current Firefox releases. You can check them in a clean profile without the JS file in "defaults/pref" file in place that specifies mozilla.cfg.

Some examples:

lockPref("security.enable_ssl2", false);
lockPref("security.enable_ssl3", false);
lockPref("security.enable_tls", true);
more options

cor-el said

I notice an Unicode quote in the file that is a likely cause:
  • lockPref("browser.urlbar.autocomplete.enabled, false);
Note that you have a lot of prefs in the file that aren't supported for quite some time in current Firefox releases. You can check them in a clean profile without the JS file in "defaults/pref" file in place that specifies mozilla.cfg. Some examples: lockPref("security.enable_ssl2", false); lockPref("security.enable_ssl3", false); lockPref("security.enable_tls", true);

Thanks for that. Found it and made the change. I'm having to go through and do these one by one till it breaks. I know a lot of these are old settings but they're a requirement to be in this file for this project.

more options

The file worked for me with this single change.

Note that you can also use try{}catch(e){} blocks in mozilla.cfg and other JavaScript code.