Gaugusch.at - Select main page

Network-wide installation of Mozilla Firefox

The target of this article is to describe the installation of Mozilla Firefox in a Windows network, to make it as easy as possible to be used.
In our setup, the installation of Firefox is not enforced, because there are other alternatives available (like Opera). In any case, users are encouraged to use anything but Internet Explorer (see also my squid article).

Get Firefox

First, get the latest version. This article describes Firefox 0.9. There is also an old version about 0.8 available. Install it on your harddisk (or unzip to any directory of your choice).
Then, get all plugins and extensions that you want to provide to your users. I recommend the following plugins and extensions:
  • Adblock (tell your users how it works!)
  • PopupAlt (For webpages that use the ALT tag for image tooltips and provide no correct TITLE tag)
  • Mouse Gestures (I LOVE that one :)
  • Adobe Reader (Note: Use 5.x or 6.0.2, but NOT 6.0.0!)
  • Macromedia Flash (annoying, but some sites need it)
Plugins are usually named npXXX.dll and must be copied to the plugins directory. Flash works great when it is preinstalled. Acrobat and Java need to be on the local machine to be able to run, though.
Don't install the extensions yet, but copy them to the Firefox directory. This has become much more complicated than with 0.8. I hope, that it will be fixed until 1.0.
Firefox 0.9 does not start up correctly, if extensions are installed into the firefox directory before the first startup. There are two variants that may happen:
  • The installation directory is hardcoded into one of the files. This makes it impossible to offer a pre-configured firefox installation that any user can copy to his harddisk (as it was possile with 0.8). With a wrong directory, Firefox loops at startup and must be killed through the taskmanager.
  • Extensions that are automatically disabled if no user profile for Firefox 0.9 is present. Even if they are installed correctly into the Firefox directory!
Installation of extensions must therefore happen after the first start of Firefox in the final installation directory. My batch file (see below) handles this, but it is not very nice :-(
Installation of extensions into the Firefox directory works with the -install-global-extension parameter of firefox.exe. It takes an xpi file as option. My install script copies all files to the users harddisk, starts firefox once to create a user profile, and installs the extensions into the firefox directory afterwards. This does not work though, if other users share the computer and don't have a firefox profile yet.
The only solution would be a second installation directory without extensions, that is started if there is no firefox directory in the users profile yet. This needs a batch file, though, and it doesn't look very professional if black windows pop up when starting the browser ...

Configuration customization

The next step is customization of default settings. Start with my settings, and copy them to defaults\pref\all.js (inside the Firefox program directory).
Another setting that I always change is the default font - I use sans-serif and Tahoma (or maybe Verdana). You can change this in the greprefs\all.js Replace all occurences of Arial with Tahoma and set font.default to sans-serif. At the top of this file you also find the proxy settings. Don't forget to set "network.proxy.type" to 1, or otherwise the proxy is not activated.
Another important setting is advanced.system.supportDDEExec. With the default of true, clicking on links in your email-program will open all in the same browser window (which means that the last visited page is replaced by the new one). If you set this to false, a new window is opened for each link.

To test your new default setup, rename your current firefox profile dir (%APPDATA%\Mozilla\Firefox) and start firefox.exe from your prepared directory.
You can verify the plugins and settings by typing about:plugins or about:config into the location bar. Extensions can be verified at Tools|Options|Extensions.

Special case - homepage

Apart from all settings in all.js, you may also want to change the default homepage that is used when the browser starts up. You can set it to your own intranet or internet homepage. This is not as easy as the other preferences, because it is hidden in locale specific jar files.
Rename the file chrome\US.jar to US.zip and extract it. Then edit locale\US\browser-region\region.properties (it's a text file) to your needs. Zip the locale directory again and rename it back to US.jar.

Search Plugins

The "google" search field can take many different plugins. Using Ctrl+Cursor Up/Down, you can select the right plugin without using the mouse. All plugins are saved to the searchplugins directory. If your shared Firefox installation is write protected, users cannot add their own engines! I've written a comment at bug #248719 about this.

Bookmarks

To set default bookmarks, copy a prepared bookmarks.html from your profile to defaults\profile\bookmarks.html and defaults\profile\US\bookmarks.html.

Final steps

Now you are ready to deploy your customized Firefox setup. Copy it to any publicly reachable directory on your fileserver. In my case, the login script creates a shortcut on the users desktop upon login, that points to a folder with important shortcuts. One of those shortcuts points directly to firefox.exe on the file server, so users can start it without installation. Of course, this is a bit slow, especially for those who are still on 10MBit hubs.
For those people and everyone else who likes Firefox, there is a second icon with a small installation batch file. It copies firefox into the local Program Files directory and creates desktop and Quick Launch icons (even if the language of your language is not English, the right directories are chosen!). You must do a few things before using the file:
  • Create a shortcut containing "%ProgramFiles%\Firefox.exe" as target (with the quotes!!)
  • Edit the path where the batch installer should copy Firefox from.
  • Edit the plugins that shall be installed
Of course, this is only useful for machines where owners have enough rights to create files on drive C. Firefox can also be installed at any other place, it doesn't need any special rights to be run!

Interesting links

Feedback is welcome. Write to articles[at]gaugusch.at