[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[seul-edu] Locking Down Mozilla or Phoenix



After a considerable amount of searching, today I finally found a way to 
lock settings in Mozilla/Phoenix.  A little more progress like this and I'll be
able to switch to one of these for our students.  As far as I can tell this
works under both Windows and Linux.

I am not sure which preferences you can lock, but I suspect you can 
at least default all of the standard ones.  I know for sure that you can
lock proxy settings and homepage since those are what I tested with.)

* Install Mozilla/Phoenix and configure the way you want
   (home page, proxy settings, etc.)
* Locate prefs.js. (In Linux it is under .mozilla/default/random.slt/ 
   (.phoenix/default/random.slt for phoenix) where random.slt could be
     named pretty much anything with .slt)
* Copy prefs.js to the directory that mozilla/phoenix and rename it to
  config.js
* Go through the file with a text editor and delete everything except
   the preferences you want to set or set-and-lock.  I'm not sure if you
   can leave comments in the file or not.. you probably can.)
* For every preference you want to lock, change user_pref to lockPref
* For every preference you want to just provide a default value for, 
   change user_pref to just pref - ie:pref("some.config.item","somevalue");
* Save your updated file.
* Download moz-byteshift.pl from
   http://alain.knaff.lu/howto/MozillaCustomization/moz-byteshift.pl
* Encode the new preferences file with this command:
   perl moz-byteshift.pl -s 13 < config.js > mozilla.cfg
   (The new mozilla.cfg needs to be in the install directory
    for mozilla or phoenix.
    For Mozilla 1.1 on RedHat 7.3 that is /usr/lib/mozilla-1.1/ )
* Add the following line to your mozilla/phoenix all.js file: 
   (This file can be found in defaults/pref under the install directory. 
    ie.. for Mozilla 1.1 under RedHat 7.3, you should find it in 
    /usr/lib/mozilla-1.1/defaults/pref/all.js )
* You should be able to copy just the all.js and the mozilla.cfg
   files to the correct directories on other systems if you have
   mozilla installed on each PC.

The filenames you use really don't matter as long as you use the same
name in the all.js file as the file you create with moz-byteshift.pl.
Also, the command line for moz-byteshift.pl assumes it is in the current 
directory.  If not you'll have to include the pathname to it.

As a side note... if you have a netscape.cfg from the old 4.x Netscape CCK,
you can unencode it with this command:
perl moz-byteshift -s -7 < netscape.cfg > netscape.js
This will let you see what settings were used for the 4.x config.

The one thing I still would like to figure out before deploying is how to 
have a centralized config.  Under NS 4.x, the 
autoadmin.global_config_url setting allowed you to name a URL
that the browser would read it's configuration from.  I used a 
different URL for each school's custom NS setup.  This was nice
because you could change the proxy (or home page, etc.) for
everybody by updating a single file on your web server.

If anyone finds out how to get this to work on the current
Mozilla/phoenix browser, please let me know.  If I get a working
solution, I'll forward it to the list.

Cory