Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

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

搜尋 Mozilla 技術支援網站

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

了解更多

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.