X
點擊此處開啟此網站的行動版。

技術支援討論區

Changing the default channel-prefs.js

已張貼

Hi,

i have been given task to change config for Mozilla ESR users in our company. I'm trying to change the value "security.enterprise_roots.enabled" which is disabled by default in update channel "esr". Is it safe to push (mass copy) new file "channel-prefs.js" with modified preference or there is another way?

pref("app.update.channel", "esr"); /* extra code */ pref("security.enterprise_roots.enabled", true);

Hi, i have been given task to change config for Mozilla ESR users in our company. I'm trying to change the value "security.enterprise_roots.enabled" which is disabled by default in update channel "esr". Is it safe to push (mass copy) new file "channel-prefs.js" with modified preference or there is another way? pref("app.update.channel", "esr"); /* extra code */ pref("security.enterprise_roots.enabled", true);

額外的系統細節

應用程式

  • User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36

更多資訊

cor-el
  • Top 10 Contributor
  • Moderator
17567 個解決方法 158885 個答案

No you shouldn't modify this file, but instead use a mozilla.cfg file in the main Firefox program folder.

You can use the mozilla.cfg file in the Firefox program folder to set or lock preferences and run privileged JavaScript code.

The mozilla.cfg file needs to be in the main Firefox program folder.

These functions can be used in the mozilla.cfg file:

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

This requires a local-settings.js file in the "defaults/pref" folder where the channel-prefs.js file is located that specifies to use mozilla.cfg.

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

The mozilla.cfg and local-settings.js files need to start with a comment line (//).

See Configuration:

See also:

No you shouldn't modify this file, but instead use a mozilla.cfg file in the main Firefox program folder. You can use the <u>mozilla.cfg</u> file in the Firefox program folder to set or lock preferences and run privileged JavaScript code. The mozilla.cfg file needs to be in the main Firefox program folder. These functions can be used in the mozilla.cfg file: defaultPref(); // set new default value pref(); // set pref, allow changes in current session lockPref(); // lock pref, disallow changes This requires a <u>local-settings.js</u> file in the "defaults/pref" folder where the channel-prefs.js file is located that specifies to use mozilla.cfg. // pref("general.config.filename", "mozilla.cfg"); pref("general.config.obscure_value", 0); The mozilla.cfg and local-settings.js files need to start with a comment line (//). See Configuration: *https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment See also: *http://mike.kaply.com/2012/03/16/customizing-firefox-autoconfig-files/