This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

সহায়তা খুঁজুন

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.

আরও জানুন

Enterprise configuration: Customizing and locking about:config

  • 1 উত্তর
  • 1 এই সমস্যাটি আছে
  • 9 দেখুন
  • শেষ জবাব দ্বারা ethanm

more options

I'm working within an enterprise environment, where I'm required to have certain Firefox configuration settings, and make the users unable to change them. Following guides I've found on several different sites, I've created a local-defaults.js file in $APPDIR$/defaults/pref/ with the following content:

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

I've also created the mozilla.cfg file in $APPDIR$/ with following content:

//Firefox Settings // try{

lockPref("browser.startup.homepage", "about:blank"); lockPref("browser.download.dir", "N:"); lockPref("browser.download.downloadDir", "N:"); lockPref("app.update.enabled", false); lockPref("extensions.update.enabled", false); lockPref("browser.shell.checkDefaultBrowser", false); lockPref("browser.search.update", false); lockPref("browser.formfill.enable", false); lockPref("signon.prefillForms", false); lockPref("dom.disable_open_during_load", true); lockPref("dom.disable_window_move_resize", true); lockPref("dom.event.contextmenu.enabled", false); lockPref("dom.disable_window_status_change", true); lockPref("dom.disable_window_flip", true); lockPref("dom.disable_window_open_feature.status", true); lockPref("security.warn_leaving_secure", true); lockPref("privacy.sanitize.promptOnSanitize", false); lockPref("privacy.sanitize.sanitizeOnShutdown", true); lockPref("security.default_personal_cert", "Ask Every Time"); lockPref("signon.rememberSignons", false); lockPref("xpinstall.whitelist.required", true); lockPref(“network.protocol-handler.external.shell”,false); lockPref(“security.enable_ssl3”,true); lockPref(“security.enable_ssl2”,false); lockPref(“security.enable_tls”,true); 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,appliation/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/wch,application/wcm,application/ad,application/adp,application/xlt, application/dos, application/wks"); lockPref("privacy.item.history", false) lockPref(" } catch(e) {

 displayError("lockedPref", e);

}

That isn't all of the settings I have configured, but they all follow the same format - lockPref("setting", and then either a boolean or "string"); My problem is that Firefox is completely ignoring any settings places in the mozilla.cfg file. If the file isn't there, or is unreadable, Firefox refuses to start (unable to read config file). I've tried commenting out all but one of the settings (lockPref("browser.startup.homepage", "about:blank"), but I'm still not seeing the setting set or recorded in about:config. Both files are UTF-8 encoded. I've tried removing the try statement, as well as the second commented line, and commenting out individual config statements (and all but one config statement), but still no change in the browser.

Anyone know why my config changes are being ignored?

I'm working within an enterprise environment, where I'm required to have certain Firefox configuration settings, and make the users unable to change them. Following guides I've found on several different sites, I've created a local-defaults.js file in $APPDIR$/defaults/pref/ with the following content: pref("general.config.obscure_value", 0); pref("general.config.filename", "mozilla.cfg"); I've also created the mozilla.cfg file in $APPDIR$/ with following content: //Firefox Settings // try{ lockPref("browser.startup.homepage", "about:blank"); lockPref("browser.download.dir", "N:"); lockPref("browser.download.downloadDir", "N:"); lockPref("app.update.enabled", false); lockPref("extensions.update.enabled", false); lockPref("browser.shell.checkDefaultBrowser", false); lockPref("browser.search.update", false); lockPref("browser.formfill.enable", false); lockPref("signon.prefillForms", false); lockPref("dom.disable_open_during_load", true); lockPref("dom.disable_window_move_resize", true); lockPref("dom.event.contextmenu.enabled", false); lockPref("dom.disable_window_status_change", true); lockPref("dom.disable_window_flip", true); lockPref("dom.disable_window_open_feature.status", true); lockPref("security.warn_leaving_secure", true); lockPref("privacy.sanitize.promptOnSanitize", false); lockPref("privacy.sanitize.sanitizeOnShutdown", true); lockPref("security.default_personal_cert", "Ask Every Time"); lockPref("signon.rememberSignons", false); lockPref("xpinstall.whitelist.required", true); lockPref(“network.protocol-handler.external.shell”,false); lockPref(“security.enable_ssl3”,true); lockPref(“security.enable_ssl2”,false); lockPref(“security.enable_tls”,true); 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,appliation/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/wch,application/wcm,application/ad,application/adp,application/xlt, application/dos, application/wks"); lockPref("privacy.item.history", false) lockPref(" } catch(e) { displayError("lockedPref", e); } That isn't all of the settings I have configured, but they all follow the same format - lockPref("setting", and then either a boolean or "string"); My problem is that Firefox is completely ignoring any settings places in the mozilla.cfg file. If the file isn't there, or is unreadable, Firefox refuses to start (unable to read config file). I've tried commenting out all but one of the settings (lockPref("browser.startup.homepage", "about:blank"), but I'm still not seeing the setting set or recorded in about:config. Both files are UTF-8 encoded. I've tried removing the try statement, as well as the second commented line, and commenting out individual config statements (and all but one config statement), but still no change in the browser. Anyone know why my config changes are being ignored?

ethanm দ্বারা পরিমিত

All Replies (1)

more options

It appears that the [code]pref("general.config.obscure_value", 0);/code doesn't actually work, so I had to remove it from the .js file and ROT13 encode the mozilla.cfg I was using.