HOWTO Lockdown Mozilla Preferences for LTSP
Copyright 2004 Warren Togami <firstname.lastname@example.org>
- Revision History
- Quick Instructions
- Mozilla Options
- Links to More Resources
This short guide explains how you can
lockdown Mozilla preferences for all users on Linux system to options
which you define. Locking down of Mozilla preferences can be
useful in public kiosks, school, university or business computers where
you want certain options (like a standard homepage) set and you do not
want users to be able to modify it.
This particular document was put together to be a succinct and quick
example of locking down preferences to be suitable for a K12LTSP
environment. See the Links to More Resources at the end of this
document to more advanced details of Mozilla and Netscape default
preference setting & locking.
These directions were last tested on Fedora Core with mozilla-1.6 and
firefox-0.8, but would probably work with other recent versions of Mozilla
and other brands of Linux.
Version 0.2 - February 25, 2004
* Include sample for Firefox 0.8
* Fix mozilla.cfg path in pref/all.js because it no longer works in
mozilla-1.6 and firefox-0.8
Version 0.1 - September 14, 2003
* Initial Release
Download these two files, then read
Instructions in the next section.
- Perl script to
byteshift a file, necessary for encoding the Mozilla .cfg file.
- Example configuration file.
You will want to edit it, or create your own.
- Example configuration for Firefox
- Save moz-byteshift.pl
- chmod 755
This step makes the script executable.
- Copy mozilla.js into the
home directory of your Mozilla browser. Scripts call this
directory MOZILLA_FIVE_HOME. This is where you will find the
browser executables, default preferences and more.
- Example locations are /usr/lib/mozilla-1.6 for Mozilla 1.6, or
/usr/lib/firefox for Firefox 0.8 from Fedora.
Edit mozilla.js to
suit your needs. Read the next section Mozilla Options to learn
what other options are available.
- Note that it really does not matter what you call this
file. I personally use firefox.js for Firefox.
moz-byteshift.pl -s 13 <
mozilla.js > mozilla.cfg
This encodes the contents of mozilla.js into mozilla.cfg. It
seems incredibly illogical and without any technical reason why it was
designed this way, but it needs to be done. Repeat this step
every time you edit mozilla.js so the changes will exist within
substituting VERSION with the actual directory name
- Again, it is unimportant what this file is called.
- It is important that the .cfg
file be in the MOZILLA_FIVE_HOME directory mentioned in step #3.
Add the following line at the bottom:
It is beyond the scope of the document to describe all possible
Mozilla options that can be set or locked in mozilla.js, though unfortunately
this is currently a poorly
documented section of Mozilla's site. Please see Mozilla's
Documentation on the subject of preferences. Otherwise this
following method of capturing the preferences never fails.
- Close Mozilla.
- Go into ~/.mozilla/default/XXXXXXXXXX.slt and make a backup copy
of prefs.js in another directory.
cp prefs.js ~/
- Open Mozilla and configure preferences using the GUI menus.
- Close Mozilla so those preferences are saved to the files.
- Go back into the directory in #2 above, then compare the
difference between the old and new configuration file using:
diff -u ~/prefs.js prefs.js
- Place options into mozilla.js
using the existing options for syntax examples. You may
need to do some editing of options, and unfortunately some options
cannot be included like browser.cache.disk.parent_directory
because it points to a user specific directory.
At this point whenever any user runs
Mozilla, it should use the options that you have specified in
mozilla.js, and will be locked from user changes. Do not forget
to rerun moz-byteshift.pl after you edit mozilla.js, or the changes
cannot be seen by Mozilla.
Links to More Resources
Locking Down Mozilla or Phoenix
This was perhaps the most useful information in figuring out the
- Mozilla.org was completely not useful in figuring out how to do
this. Please fix this situation!