為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Deploy Standard Configuration to multiple PCs Issue

  • 6 回覆
  • 1 有這個問題
  • 1 次檢視
  • 最近回覆由 ntripp

more options

I'm currently having an issue deploying setting to multiple Firefox installs. After trying a few methods it seems that user.js or similar js files is the way to go.

The user.js file is successfully copied to user profiles but the settings are not taking affect.

site-list = "internaldomain.com,sctwsgateway.internaldomain.com:8080,gateway:8080,gateway:8080" pref("network.negotiate-auth.trusted-uris", "internaldomain.com,gateway.internaldomain.com:8080,gateway:8080,gateway:8080); pref("network.negotiate-auth.delegation-uris", site-list); pref("network.automatic-ntlm-auth.trusted-uris", site-list); pref("network.automatic-ntlm-auth.allow-non-fqdn", true); pref("network.automatic-ntlm-auth.allow-proxies", true); pref("browser.shell.checkDefaultBrowser", false);

internaldomain.com is a substitution for our actual domain

I'm currently having an issue deploying setting to multiple Firefox installs. After trying a few methods it seems that user.js or similar js files is the way to go. The user.js file is successfully copied to user profiles but the settings are not taking affect. site-list = "internaldomain.com,sctwsgateway.internaldomain.com:8080,gateway:8080,gateway:8080" pref("network.negotiate-auth.trusted-uris", "internaldomain.com,gateway.internaldomain.com:8080,gateway:8080,gateway:8080); pref("network.negotiate-auth.delegation-uris", site-list); pref("network.automatic-ntlm-auth.trusted-uris", site-list); pref("network.automatic-ntlm-auth.allow-non-fqdn", true); pref("network.automatic-ntlm-auth.allow-proxies", true); pref("browser.shell.checkDefaultBrowser", false); internaldomain.com is a substitution for our actual domain

被選擇的解決方法

Sorry, I am not a developer just an advanced Firefox user starting in 2002 with Phoenix 0.3. I have always used user_pref in user.js. And the original 'bible' for advanced Firefox users - http://kb.mozillazine.org/User.js_file - shows user_pref as the syntax to use.

I suspect that pref is appropriate for a mozilla.cfg file only - https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment - as shown under Configuration in that article.

What I have learned thru experience with user.js over the years is With user.js if there is one faulty or invalid pref Firefox won't read the user.js file any further; only the prefs above the faulty pref will be read. Usually you can figure out where Firefox stopped reading the user.js by viewing the prefs.js file in the Profile folder; the prefs above the faulty pref will make it to prefs.js but the faulty pref and those below it won't be in the prefs.js file. I have run into that many times over the years where user.js didn't seem to work or stopped working partway thru the file; usually due to a mistype I made. but also when there was a major change to Firefox which invalidated or deprecated a pref that I had been using in any earlier version.


Also, why is this at the top? site-list = "internaldomain.com,sctwsgateway.internaldomain.com:8080,gateway:8080,gateway:8080";

If that is in your user.js file, at the top - that looks like the faulty pref, nothing below that would be read.

從原來的回覆中察看解決方案 👍 1

所有回覆 (6)

more options

user_pref is used before the prefs in user.js - not merely user

As to the validity of the actual preferences, I can't comment as I am not familiar with the 'network' prefs.

more options

I had the settings with user_pref according to this:

https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/A_brief_guide_to_Mozilla_preferences

user_pref or pref should work. I can switch it back and test again, but I've previously used both.

more options

site-list = "internaldomain.com,sctwsgateway.internaldomain.com:8080,gateway:8080,gateway:8080"; user_pref("network.negotiate-auth.trusted-uris", "internaldomain.com,gateway.internaldomain.com:8080,gateway:8080,gateway:8080); user_pref("network.negotiate-auth.delegation-uris", site-list); user_pref("network.automatic-ntlm-auth.trusted-uris", site-list); user_pref("network.automatic-ntlm-auth.allow-non-fqdn", true); user_pref("network.automatic-ntlm-auth.allow-proxies", true); user_pref("browser.shell.checkDefaultBrowser", false);

Same result unfortunately. Thanks for the thought though.

more options

Those preferences all exist in about:config. Do you have another setting you can suggest I add to the file to test it takes effect?

more options

選擇的解決方法

Sorry, I am not a developer just an advanced Firefox user starting in 2002 with Phoenix 0.3. I have always used user_pref in user.js. And the original 'bible' for advanced Firefox users - http://kb.mozillazine.org/User.js_file - shows user_pref as the syntax to use.

I suspect that pref is appropriate for a mozilla.cfg file only - https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment - as shown under Configuration in that article.

What I have learned thru experience with user.js over the years is With user.js if there is one faulty or invalid pref Firefox won't read the user.js file any further; only the prefs above the faulty pref will be read. Usually you can figure out where Firefox stopped reading the user.js by viewing the prefs.js file in the Profile folder; the prefs above the faulty pref will make it to prefs.js but the faulty pref and those below it won't be in the prefs.js file. I have run into that many times over the years where user.js didn't seem to work or stopped working partway thru the file; usually due to a mistype I made. but also when there was a major change to Firefox which invalidated or deprecated a pref that I had been using in any earlier version.


Also, why is this at the top? site-list = "internaldomain.com,sctwsgateway.internaldomain.com:8080,gateway:8080,gateway:8080";

If that is in your user.js file, at the top - that looks like the faulty pref, nothing below that would be read.

more options

seems the user.js can't use variables. after adding the string manually to all the elements it's working.