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

搜索 | 用户支持

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

详细了解

Issues Locking Preferences

  • 4 个回答
  • 4 人有此问题
  • 5 次查看
  • 最后回复者为 cor-el

more options

I am attempting to lock some user preferences in firefox 5.0.1 for windows XP. I have completed the following steps:

1. Created and converted "Mozilla.txt" to mozilla.cfg with proper ROT13 encoding as per http://kb.mozillazine.org/Locking_preferences.

2. Created local_setting.js with proper code as per http://kb.mozillazine.org/Locking_preferences

3. Moved both files in required directories as required per thead above.

4. Restart Firefox.

Upon restart, no setting where locked.

below is a copy of my mozilla.cfg file before converting it.

___________________________________________

//
lockPref("security.enable_ssl3", false);
lockPref("security.default_personal_cert", "Ask Every Time");
lockPref("network.protocol-handler.external.shell", false);
lockPref(“plugin.disable_full_page_plugin_for_types”, "PDF, FDF, XFDF, LSL, LSO, LSS, IQY, RQY, XLK, XLS, XLT, POT PPS, PPT, DOS, DOT, WKS, BAT, PS, EPS, WCH, WCM, WB1, WB3, RTF");
lockPref("browser.formfill.enable", false);
lockPref("signon.prefillForms", false);
lockPref("signon.rememberSignons", false);  
lockPref("privacy.sanitize.sanitizeOnShutdown", false);
lockPref("privacy.sanitize.promptOnSanitize", true);
lockPref("dom.disable_window_open_feature.status"; true);
lockPref("dom.disable_window_move_resize", true);
lockPref("security.enable_ssl2", false);
lockPref("security.enable_tls", true);
lockPref("dom.disable_window_flip", true);
lockPref("dom.event.contextmenu.enabled", false);
lockPref("dom.disable_window_status_change", true);
lockPref("dom.disable_window_open_feature.status", true);
lockPref("security.warn_leaving_secure", true);

___________________________________________

Did I do something wrong? I thought I might have missed a step so I verified I did not and I am now sure I have completed all steps as required. Anyone know the trick here? I expected the setting to be greyed out. Am I expected the wrong result here?

I am attempting to lock some user preferences in firefox 5.0.1 for windows XP. I have completed the following steps: 1. Created and converted "Mozilla.txt" to mozilla.cfg with proper ROT13 encoding as per http://kb.mozillazine.org/Locking_preferences. 2. Created local_setting.js with proper code as per http://kb.mozillazine.org/Locking_preferences 3. Moved both files in required directories as required per thead above. 4. Restart Firefox. Upon restart, no setting where locked. below is a copy of my mozilla.cfg file before converting it. ___________________________________________ <pre><nowiki>// lockPref("security.enable_ssl3", false); lockPref("security.default_personal_cert", "Ask Every Time"); lockPref("network.protocol-handler.external.shell", false); lockPref(“plugin.disable_full_page_plugin_for_types”, "PDF, FDF, XFDF, LSL, LSO, LSS, IQY, RQY, XLK, XLS, XLT, POT PPS, PPT, DOS, DOT, WKS, BAT, PS, EPS, WCH, WCM, WB1, WB3, RTF"); lockPref("browser.formfill.enable", false); lockPref("signon.prefillForms", false); lockPref("signon.rememberSignons", false); lockPref("privacy.sanitize.sanitizeOnShutdown", false); lockPref("privacy.sanitize.promptOnSanitize", true); lockPref("dom.disable_window_open_feature.status"; true); lockPref("dom.disable_window_move_resize", true); lockPref("security.enable_ssl2", false); lockPref("security.enable_tls", true); lockPref("dom.disable_window_flip", true); lockPref("dom.event.contextmenu.enabled", false); lockPref("dom.disable_window_status_change", true); lockPref("dom.disable_window_open_feature.status", true); lockPref("security.warn_leaving_secure", true);</nowiki></pre> ___________________________________________ Did I do something wrong? I thought I might have missed a step so I verified I did not and I am now sure I have completed all steps as required. Anyone know the trick here? I expected the setting to be greyed out. Am I expected the wrong result here?

由cor-el于修改

所有回复 (4)

more options

To which folder did you copy the local_settings.js file?

That file should be in the C:\Program Files\Mozilla Firefox\defaults\pref\ folder where you can find the channel-prefs.js file.

If the mozilla.cfg file is obscured then you only need this line:

pref("general.config.filename", "mozilla.cfg");
more options

local setting.js is located in the C:\Program Files\Mozilla Firefox\defaults\pref\ directory.

If i remove the pref("general.config.obscure_value", 0); from local_setting.js it says it cannot read the file correctly.

more options

I have done the following and still no luck: 1. Changed "lockPref" to "lockpref" 2. Change "false" to "False" and "true" to "True" No Luck!

Other things I have noticed: 1. If i rename the original mozilla.txt to mozilla.cfg and edit the local_setting.js to not include the ("general.config.obscure_value", 0); the appication opens fines but no setting are locked.

2. To use the "coverted file" I need to have the "("general.config.obscure_value", 0);" within the "local_setting.js". Maybe I am reading the directions wrong but I feel like they are telling me to do the exact opposite.

Are text files created through notepad in windows created with ROT13 format?

I think there is an issue with my .cfg file. I copied and pasted it in my original post and I am now attaching it in a screen shot.


I have seem other ways to do this on the web but I do not want to edit the omni.jar file. I need a solution that will be easy to maintain.

more options

Notepad only creates plain text text files.
You need to run a ROT-13 script or program to code the file.

If you do not use obfuscation then mozilla.cfg and mozilla.txt should be the same.
Check the file type to be sure that then name doesn't have a hidden .txt file extension (mozilla.cfg.txt)

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