We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

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 수정일시

모든 댓글 (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.