The Inside Track on Firefox Development.

« We will miss you | Main | Version Number Changes »

July 1, 2005

Firefox Enterprise Notes

I had some Enterprise deployment thoughts today.

Deploying with Extensions

If you're deploying Firefox 1.0 across your corporate network you may be wondering how to deploy extensions with Firefox. Firefox has the ability to install extensions in the Application directory for all users on the system using a command line flag, but there was never a way to cleanly uninstall Extensions.

Today, I had an idea - in a corporate network situation, it is generally assumed that the system administrators will be controlling the content of the application directory (in e.g. C:\Program Files\Mozilla Firefox) and that the user will not be installing many Firefox Extensions there - since it requires them to use the command prompt and most just use the web install into the profile directory. Based on this likelihood I decided it'd be acceptable for the system administrator to be able to periodically trash the contents of the c:\Program Files\Mozilla Firefox\extensions directory and rebuild it.

So, without further ado:

Installing Extensions

  1. Install Firefox from your system administration system. Remember where you installed firefox.exe to.
  2. Place the extension xpi somewhere on the system, e.g. a temporary directory.
  3. Run firefox.exe with the -install-global-extension command line flag. e.g. firefox.exe -install-global-extension C:\path\to\extension.xpi Repeat for every extension xpi file.

Uninstalling Extensions

To uninstall an extension with GUID {FOO}:

  1. Enumerate the C:\Program Files\Mozilla Firefox\extensions\ directory. For every subdirectory that has a name that matches a GUID pattern, add to a holding array if the GUID name does not equal {FOO}.
  2. Remove Extensions.rdf (or move it aside)
  3. Remove installed-extensions*.*
  4. Write a new file installed-extensions.txt in this format: theme,{GUID} extension,{GUID} for each item in the "good" array (these are items you're not uninstalling). Don't forget the default theme, whose line should start something like this: theme,{972... otherwise if users install other themes they won't be able to switch back to the default one.
  5. Run firefox.exe -register as administrator to cause the Extensions.rdf file to be regenerated.
  6. The item you removed will be gone.

Extensions.rdf in the application extensions directory holds a set of metadata about all extensions installed there. Do not try to hand parse it - it is RDF/XML and its structure is not deterministic. Rather, use the process described above to rebuild it based on a known "good" set.

Firefox 1.1

Firefox 1.1 will make all of this simpler. With Firefox 1.1 -install-global-extension still works, but the uninstall approach listed above does not apply (and should not be attempted, as the files mentioned do not exist).

The easiest way to install an Extension in Firefox 1.1 is to install it somewhere on the user's hard disk, e.g. C:\Program Files\My Firefox Extension\ (with a directory hiearchy under that that matches the extension structure within the XPI)

Set a string value under this registry key under HKEY_LOCAL_MACHINE:

SOFTWARE\Mozilla\Firefox\Extensions

ID=C:\path\to\extension\dir

where ID is a valid Extension ID, e.g. foo@bar.com or {GUID}
and the path is the path to the extension location.

The first time each user runs Firefox, the Extension Manager will detect the location and register the Extension there. To uninstall, you simply unset the registry key and remove the files. That's it!

MSIs

We will need to provide high quality MSIs to aid corporate deployments. The install system may change significantly in the 1.5-2.0 timeframe with the rebundling of Firefox using XULRunner. That will be very exciting.

Configuration

We should come up with a way to reflect preferences into some sort of system that works with existing network configuration tools, e.g. by using the Windows Registry. The days when we can expect every Windows network to special case an install of Mission Control Desktop to handle preference management are probably over. Other solutions for other platforms should be devised, in addition to our existing Pref Locking/MCD approach.

Posted by ben at July 1, 2005 9:13 PM

Comments

In addition to extensions proxy & authentication settings are another key aspect of enterprise configuration.

If Firefox can be set to use the proxy settings from IE (as most other windows programs do) then IT shops can continue to use their current processes to administer Firefox installations proxy settings.

- rmjb

Posted by: rmjb [TypeKey Profile Page] at July 4, 2005 9:29 AM