Purpose
Mozilla Autoconfig is the primary method used to configure Mozilla Firefox on MIT Athena. Mozilla Autoconfig (aka. Mission Control) allows locker maintainers to lock user profile settings and set defaults. Settings specified via autoconfig can be changed at any time and are automatically applied when Mozilla Firefox starts up. These settings also apply to all of a user's profiles, including any profiles they create themselves.
Some documentation on how to setup Mozilla Autoconfig is availible if you'd like some additional information. The autoconfig code is part of the pref extension. This extension is included in the default Mozilla.org builds, and must be compiled into the build for Autoconfig to function.
Files & Tools
Startup Sequence
When Firefox starts up, the following steps occur:
- The /mit/firefox/arch/$ATHENA_SYS/versions/${version}/greprefs/all.js
file is read. This file has had the
pref('general.config.filename', 'mit.cfg');
andpref('general.config.obscure_value', 0);
preferences added to it. These preferences indicates that the plaintext config file named mit.cfg should be read. - The config file /mit/firefox/arch/$ATHENA_SYS/versions/${version}/mit.cfg is read by Firefox. This is a symlink to the file /mit/firefox/arch/share/autoconfig/mit.cfg. This file tells Firefox the url of the file containing the configuration information.
- The configuration info is read from the file at /mit/firefox/arch/share/autoconfig/athena.js and applied to mozilla
Files
- mit.cfg
- This callfile directs Firefox to the URL of the file containing configuration information for Athena.
- athena.js
- This file contains the configuration information to apply to Mozilla Firefox when it starts up.
Tools
For autoconfig to work, the all.js file must include the
pref('general.config.filename', 'mit.cfg');
and pref('general.config.obscure_value', 0);
preferences, and
the Firefox binary directory must contain a symling to the mit.cfg file.
To simplify this process, a tool is availible in the
/mit/firefox/arch/share/bin/tools directory:
- setcfg.sh
- This tool should be run whenever a new Firefox binary is added to
the locker. This tool adds the
pref('general.config.filename', 'mit.cfg');
preference to the all.js file for all installed versions of firefox. It also creates the symlink pointing to the mit.cfg file. For this to work, the Firefox binary directories must be in the appropriate .build directory, and the directory names must begin with firefox.
User Profiles & Defaults
The skeleton for new user profiles is stored in the /mit/firefox/arch/share/profiles/default/ directory. The contents of this directory are copied into each of the /mit/firefox/arch/$ATHENA_SYS/versions/*/defaults/profile/ directories by the setcfg.sh script.
If a user has not run Mozilla Firefox before, Firefox will automatically create a default profile for them. Firefox creates a new user profile by copying the contents of the /mit/firefox/arch/$ATHENA_SYS/versions/${version}/defaults/profile/ directory into the new profile. This directory contains files provided with the Firefox distribution plus additions made by the setcfg.sh script.
For Firefox, the new user profile is created in the $HOME/.mozilla/firefox/????????.default/ directory.
The /mit/firefox/arch/share/profiles/default/ directory for Firefox currently contains 5 files. These include:
- bookmarks.html
- Sets the user's default bookmarks
- hostperm.1
- Sets the user's cookie permissions
- localstore.rdf
- Defines the default user interface layout
- mimeTypes.rdf
- Sets the mimetype mappings / helper applications for Athena
- prefs.js
- Sets the default homepage (works around a bug where you can't set the default homepage via autoconfig).