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

搜索 | 用户支持

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

详细了解

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.