{"id":8,"date":"2005-03-26T01:12:00","date_gmt":"2005-03-26T08:12:00","guid":{"rendered":"http:\/\/ilias.ca\/blog\/?p=8"},"modified":"2019-03-18T20:38:48","modified_gmt":"2019-03-19T00:38:48","slug":"locking-mozilla-firefox-settings","status":"publish","type":"post","link":"https:\/\/ilias.ca\/blog\/2005\/03\/locking-mozilla-firefox-settings\/","title":{"rendered":"Locking Mozilla Firefox Settings"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/images.ilias.ca\/Firefox-32x32.png\" alt=\"\" border=\"0\"\/><br \/>\n<span style=\"color: #ff0000; font-weight: bold\">Note: If you need assistance on implementing these instructions, ask in the <a href=\"https:\/\/ilias.ca\/blog\/2006\/01\/instructions-for-new-newsgroup-server\/\">mozilla.support.firefox newsgroup<\/a>. Not in a comment to this blog post.<\/span><\/p>\n<p>Let&#8217;s say you are the administrator of one or more installations of <a href=\"https:\/\/getfirefox.com\/\">Mozilla Firefox<\/a> and you want to lock certain <a href=\"http:\/\/www.mozilla.org\/support\/firefox\/options\">settings\/options<\/a>, so users cannot edit them. For instance you may want to prevent people from changing the <a href=\"http:\/\/www.mozilla.org\/support\/firefox\/options#connection\">proxy setting<\/a>, the homepage, the ability to save passwords, etc.<\/p>\n<p>It is possible, but it&#8217;s a little complicated.<\/p>\n<p>First you need to find out what the names are of the preferences you wish to lock. The best way to do this is by entering <strong>about:config<\/strong> in the Firefox location bar. Every preference that has been used will appear in the resulting list. You can use the filter field to search for preferences that contain certain words. For instance, if you&#8217;re looking for the homepage <acronym title=\"Uniform Resource Locator\">URL<\/acronym> setting, just type <strong>homepage<\/strong> in the filter field. For more info on preference names, and about:config see:<br \/>\n<a href=\"http:\/\/kb.mozillazine.org\/About:config\">http:\/\/kb.mozillazine.org\/About:config<\/a><\/p>\n<p>Next, create a file anywhere on your hard drive, called <strong>mozilla.txt<\/strong>. Open mozilla.txt in a text editor (Notepad), and begin the first line with two forward slashes. The following lines will contain the preferences you want to lock, and their values. They should be in the same form as you see them in your <a href=\"http:\/\/www.mozilla.org\/support\/firefox\/edit#profile\">profile&#8217;s prefs.js file<\/a>, with one exception: instead of using <em>user_pref<\/em>, use <strong>lockPref<\/strong>. For instance, if you want to lock the proxy at &#8220;<em>direct connection<\/em>&#8220;, and lock the homepage at (forgive the ego) http:\/\/ilias.ca, the contents of your mozilla.txt file would look like this:<br \/>\n<code style=\"font-weight: bold; color: #333399\">\/\/<br \/>\nlockPref(\"network.proxy.type\", 0);<br \/>\nlockPref(\"browser.startup.homepage\", \"http:\/\/ilias.ca\/\");<\/code><\/p>\n<p>Here&#8217;s where it gets tricky. The file must be encoded, and renamed. The encoding is a simple &#8220;byte-shifting&#8221; with an offset of 13. You can download a program that will do this <a href=\"http:\/\/home.comcast.net\/%7Edabbink\/dabbink\/ByteShifter.htm\">here<\/a>, or use an online encoder <a href=\"http:\/\/www.alain.knaff.lu\/%7Eaknaff\/howto\/MozillaCustomization\/cgi\/byteshf.cgi\">here<\/a>.<\/p>\n<p>The resulting file should be named <strong>mozilla.cfg<\/strong>. Save that in the same directory as firefox.exe.<\/p>\n<p>Last step: In <em>C:\\Program Files<\/em>\\Mozilla Firefox\\greprefs\\ there&#8217;s a file called <strong>all.js<\/strong>. Open all.js in a text editor, and add the following line at the end of it:<br \/>\n<code style=\"font-weight: bold; color: #333399\">pref(\"general.config.filename\", \"mozilla.cfg\");<\/code><\/p>\n<p>Save, close, and start Firefox to test it.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/ilias.ca\/screenshots\/ff-LockedPref.png\" alt=\"\"\/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Note: If you need assistance on implementing these instructions, ask in the mozilla.support.firefox newsgroup. Not in a comment to this blog post. Let&#8217;s say you are the administrator of one or more installations of Mozilla Firefox and you want to&hellip;  <\/p>\n<p class=\"more-link\"><a href=\"https:\/\/ilias.ca\/blog\/2005\/03\/locking-mozilla-firefox-settings\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,2],"tags":[],"class_list":["post-8","post","type-post","status-publish","format-standard","hentry","category-firefox","category-mozilla"],"_links":{"self":[{"href":"https:\/\/ilias.ca\/blog\/wp-json\/wp\/v2\/posts\/8","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ilias.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ilias.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ilias.ca\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/ilias.ca\/blog\/wp-json\/wp\/v2\/comments?post=8"}],"version-history":[{"count":2,"href":"https:\/\/ilias.ca\/blog\/wp-json\/wp\/v2\/posts\/8\/revisions"}],"predecessor-version":[{"id":1005,"href":"https:\/\/ilias.ca\/blog\/wp-json\/wp\/v2\/posts\/8\/revisions\/1005"}],"wp:attachment":[{"href":"https:\/\/ilias.ca\/blog\/wp-json\/wp\/v2\/media?parent=8"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ilias.ca\/blog\/wp-json\/wp\/v2\/categories?post=8"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ilias.ca\/blog\/wp-json\/wp\/v2\/tags?post=8"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}