Purpose
The goal of the Firefox and Thunderbird scripts is to simplify execution of the binaries, automate setup of user profiles, and aid in the testing of new installations.
Both scripts are based on the IS script used to launch the Mozilla Suite (SeaMonkey).
Execution
A launcher script is availible for both firefox and Thunderbird. The scripts are:
- firefox.sh
- Launches Mozilla Firefox. AFS location: /mit/firebird/arch/share/bin/MozillaFirefox/firefox.sh
- thunderbird.sh
- Launches Mozilla Thunderbird. AFS location: /mit/firebird/arch/share/bin/MozillaThunderbird/thunderbird.sh
Both scripts automatically create the execution environment. This includes setting the paths to needed libraries and plugins. Necessary lockers are attached.
As with Mozilla, the user's profile is checked to see whether it is locked. If so, the user is presented with a dialog asking them what to do.
If Firefox/Thunderbird are already running, the script will attempt to open a new window. Otherwise, the binary will be executed.
User Profiles & Defaults
The script automatically checks whether the user has run the application before. If they have, it continues. If they have not, The script will create a new user profile with specified settings.
The settings for each application are generated by several files (listed below). In addition, all items in the /mit/firebird/arch/share/bin/$app/profile/athena/profroot/ directory are copied into the new user profile. The contents of this directory are described below.
Mozilla Firefox
For Firefox, the user profile is created in the $HOME/.mozilla/firefox/athena.???/ directory. There are two files that specify the default user preferences placed there. They are:
- prefs.sh
- This file generates the default user configuration. These preferences are placed in the user's prefs.js file. Users can override these settings through the UI.
- user.sh
- This file generates the default policies. These preferences are placed in the user's user.js file. Preferences here override those made in the GUI.
The profroot/ directory for Firefox currently contains 4 files. These include:
- mimeTypes.rdf
- Sets the mimetype mappings / helper applications for Athena
- localstore.rdf
- Defines the default user interface layout
- bookmarks.html
- Sets the user's default bookmarks
- hostperm.1
- Sets the user's cookie permissions
Mozilla Thunderbird
For Thunderbird, the user profile is created in the $HOME/.thunderbird/athena.???/ directory. There are three files that specify the default user preferences placed there. They are:
- prefs.sh
- This file generates the default user configuration. These preferences are placed in the user's prefs.js file. Users can override these settings through the UI.
- user.sh
- This file generates the default policy preferences. These preferences are placed in the user's user.js file. Preferences here override those made in the GUI.
- mailconfig.sh
- This file generates the user's MIT Mail settings. These preferences are placed in the user's prefs.js file. Users can override these settings through the UI.
The profroot/ directory for Thunderbird currently contains 1 file. These include:
- mimeTypes.rdf
- Sets the mimetype mappings / helper applications for Athena
- training.dat
- Contains training data for Thunderbird's spam filters.
Testing & Versions
Binary Directories
The scripts require a particular directory structure in order to find the binaries to run. Specifically, binaries must be placed in directories named: /mit/firebird/arch/$ATHENA_SYS/bin/$application/$version/ (which may be a symlink to another location). Versions may be specified by passing either of the following options as the first argument to the script. If no argument is specified the current version (pointed to by the current symlink) is run.
- --listver
- Lists the versions of Mozilla Thunderbird that are availible for your particular hardware platform. This lists everything in the /mit/firebird/arch/$ATHENA_SYS/bin/$application/ directory which is not prefixed by a '.'
- --runver <version>
- Runs the specified version of Mozilla Thunderbird. If the specified version is invalid, the script exits with an error.
New versions can be added by placing them in a new directory under the /mit/firebird/arch/$ATHENA_SYS/bin/$application/ directory.