Firefox 17 ESR EOL Today

Firefox 24 ESR should be officially released today which means Firefox 17 ESR users will be automatically upgraded to Firefox 24 ESR. I want to take this opportunity to remind everyone of a major change that happened in Firefox 21 that will impact everyone upgrading to Firefox 24 ESR.

The location of a number of important files that are used to customize Firefox has changed. Here's the list:

  • defaults/preferences -> browser/defaults/preferences
  • defaults/profile -> browser/defaults/profile
  • extensions -> browser/extensions
  • searchplugins -> browser/searchplugins
  • plugins -> browser/plugins
  • override.ini -> browser/override.ini

If you find that anything you've customized is not working anymore, these changes are probably the reason.

Creating a Customized Firefox Distribution

You may have heard of the the Firefox Build Your Own Browser Project. On the web page, it says it "is a simple way that your organization can create and distribute a customized version of Firefox." I think BYOB is a great start to solving the distribution problem, but it's missing one key thing - the ability to bundle your own add-ons.

What I'm going to do with this post is explain exactly how BYOB works internally so that you can create your own distribution that has all the customizations you want. There are a some downsides to our method - primarily that we are Windows only and that we can't sign our installers with the Mozilla certificate. But it's the only way we can create a distribution that includes our own add-ons.

Customizing the Firefox Installer on Windows

One of the questions I get asked a lot is how to customize the Firefox installer on Windows and how to bundle extensions with it. I've spent the past few days learning a great deal about this subject, so I thought I would take this opportunity to provide a refresher on working with the Firefox installer on Windows. I'm going to do it as a Q&A so hopefully folks will get answers to the common questions they have.

Standard disclaimer: Under no circumstances should you use this information to create a custom Firefox install and redistribute it to anyone outside your organization. If you want more information, you can consult the Mozilla Foundation Trademark Policy.

What tools do I need to work with the Firefox installer?

The primary tool you need is 7-Zip. I install the MozillaBuild package which gives me all the tools I need. Even though the Firefox Installer is NSIS based, we will not need to use NSIS for most customizations. I'll talk a little bit about the end about what kinds of things you would need NSIS to do.

How do I unpack the Firefox installer?

The Firefox installer is created using 7-Zip. So you can grab any of the Windows installers that end in EXE and unpack them. Any of the Windows installers on the Firefox download page will work. Once you've downloaded the EXE, create a temporary directory and type:

7z x "Firefox Setup 3.6.3.exe"


This will unpack the contents of the installer so we can modify it.

How do I bundle my extension with the Firefox installer?

Bundling your extension with the Firefox installer is just a matter of putting it in the right place. Then when we package up the installer at the end, it will get installed along with Firefox. For most extensions, the right place is nonlocalized/extensions. Inside that directory, create a subdirectory that corresponds to the ID of the extension you want to preinstall with Firefox. Then unzip the XPI into that directory. You can find the ID by looking at the install.rdf file inside the XPI. You can add as many extensions as you want into the installer.

What are some useful extensions I can bundle with Firefox

I've created two extensions that create interesting things to bundle with Firefox. The first is the CCK Wizard. The CCK Wizard can be used to change various defaults in Firefox so that you can customize it for deployment in your organization. The second is Rebrand. Rebrand allows you to change the internal branding used in Firefox.

Can I change the names used in the installer?

Yes, you can change the names used in the installer. To do this, you need to create a directory called distribution inside the localized directory that was created when you unpacked the installer. Create a file called setup.ini in this directory. Here's what it looks like:

[Branding]
BrandFullName=Mike's Browser
BrandShortName=Browser


BrandFullName will be used to replace "Mozilla Firefox" and BrandShortName will be used to replace "Firefox".

Can I change the images used in the installer?

Yes, you can change the images used in the installer. In that same directory where you put the setup.ini, you can put two files, modern-wizard.bmp and modern-header.bmp. The first images corresponds to the large image on the first page of the installer. The second image corresponds to the small image that is used on later pages of the installer. You can use the linked images as a reference to know what size to make these images.

How do I repackage the installer?

To repackage the installer, first you need to zip up the changes that you made. Type:

7z a -r -t7z app.7z -mx -m0=BCJ2 -m1=LZMA:d24 -m2=LZMA:d19 -m3=LZMA:d19 -mb0:1 -mb0s1:2 -mb0s2:3


This will create a file called app.7z that has all the changes we made. Now we need to package that file with some other files to create the final EXE. We'll need the file 7zSD.sfx which you can download from Mozilla. And we'll need a file called app.tag which you can create. It looks like this:

;!@Install@!UTF-8!
Title="Mozilla Firefox"
RunProgram="setup.exe"
;!@InstallEnd@!


Once we have these files, we can run the command:

copy /B 7zSD.sfx+app.tag+app.7z our_new_installer.exe


to package them all as an EXE. Don't forget the /B. It indicates that the files are binary so Windows won't put an EOF marker on them.

Can I change the defaults that are set in the installer like the install directory or the checkboxes?

At this time, there is no way to change the defaults in the installer without rebuilding the installer. There's a bug open on this with a patch, so hopefully this will be fixed for Firefox 4.

Can I make my totally rebranded Firefox coexist nicely with an existing Firefox?

There are a couple ways to do this. The easiest way is to use the -no-remote parameter when you start Firefox. This causes the Firefox you are starting to not connect to the Firefox that is currently running. When you do this, you have to specify a different profile using the -P parameter. Alternatively, you can change the internal identifiers that Firefox uses. Then it will be considered to be a completely different browser. If you choose to do this, you should be aware that you will not receive updates and there will be other side effects. This is not a decision that should be taken lightly. Also, your profiles will be stored in different locations as well. If you want to do this, check out the file application.ini in the nonlocalized directory. The variables you want to change are Vendor and Name. Again, you do this at your own risk.

What can I do if I'm willing to rebuild the installer with NSIS?

If you are willing to rebuild the installer, you can change things like the name of the entry in the Add/Remove programs list, as well as the install directory and other defaults. This is a nontrivial exercise because some of the required files are built as part of the Mozilla build proces and are not available in the build tree. If you're really interested in doing this, you can contact Kaply Consulting and we can talk about it.

I hope this answered some questions folks have. If anyone has any more questions, please don't hesistate to ask.

CCK Wizard Status

With the release of Firefox 3.6, people are already asking me about a new CCK Wizard. I am working on an update. You can get a beta of that here. Primary changes are more information on the proxy page, ability to open an existing CCK and better coexistence of multiple CCKs.

Most interesting news on the CCK front is that I've decided to move it to Google Code instead of maintaining in the Mozilla trees. The URL is http://code.google.com/p/ff-cckwizard/. My primary reason for doing this is honestly that I'm not really contributing to Mozilla/Firefox proper anymore and messing with Mercurial isn't worth it for me (I know, lame excuse.) It has some other advantages, though, like having my own bug reporting system and not having to get any reviews/approvals for checkins.

So if you have ideas/suggestions/bugs for the CCK Wizard, please open them in Google Code.

Also note that CCK Wizard is something I do on the side, so my time is limited. Contributions help. I know there are a lot of folks who depend on this for the business. Any and all love is appreciated.

I Couldn't Stay Away From the CCK

So it just so happens that some of the work I'm doing before I leave IBM involves the CCK, so I ended up working on it and fixing some bugs. In addition, a company asked for a feature that was pretty easy to implement. So here for your testing pleasure is:

CCK Wizard version 1.2.5

Here's a summary of what's changed:

  • Dropped support for Firefox 2
  • Added support for specifying sites where cookies are always allowed
  • Added support for specifying sites to deny popups/installs/cookies
  • Rewrote CCKService XPCOM Component to be a little cleaner
  • Fixed problem where sometimes a created CCK wouldn't install (ZIP path problem)
  • Fixed problem where sometimes bookmarks weren't created on first load
  • Fixed problem where bookmarks weren't created in the same order as specified in the CCK Wizard
  • Made the additional help menu look better on Mac

Enjoy!

Enterprise Firefox Requirements

I was going through some old documents from the office and found the result of a brainstorming session around Enterprise Firefox requirements. I wanted to capture this list somewhere and figured this was the best place. Note that some of these might be done and some of these might not even be clear - this was just a moment in time. It will be interesting to see what other folks think of the list. It is in no particular order.

  • Security (keycards, etc.)
  • MSI Packaging
  • Active Directory Integration
  • Perfect unattended install
  • Allow entire Firefox directory to be specified
  • Roaming profiles
  • CCK for Thunderbird
  • Store preferences in registry?
  • Allow cache to be local with a remote profile
  • Better ActiveX sandbox for Firefox
  • Scalable deployment/management
    • IEAK
    • Active Directory
    • Registry Editing
  • Centralized Management
  • Better enterprise patch deployment tools (Tivoli)
  • WebDAV?
  • LDAP
  • Kiosk mode
  • Whitelisting

What do people think? What on this list is really important?

Customizing Firefox with the CCK Wizard

New version with fix for search engines not working.

FYI, I'm making a beta of the CCK Wizard available today for Firefox 3.

If you are deploying Firefox in your enterprise, educational institution, or even your household, you'll want to check out the CCK Wizard (info at that link is a little dated right now).The CCK Wizard is an implementation of the old Netscape CCK that allows you to customize various aspects of Firefox and then contain all of those customizations in a single Firefox extension. Here are some of the things you can do

  • Add an identifier to the user agent string
  • Change the default home page and startup override home page
  • Change the title bar text
  • Change the animated logo
  • Add a web page and tooltip used for the animated logo
  • Add a help menu item that links to a web page
  • Provide sites for which popups and XPInstalls are allowed by default
  • Preinstall browser plug-ins
  • Preinstall search engines
  • Change the default search engine
  • Add folders, bookmarks and live bookmarks to the personal toolbar
  • Add folders, bookmarks and live bookmarks to the bookmarks folder
  • Set default preferences
  • Lock preferences
  • Add registry keys (Windows only)
  • Add certificates (See NOTE below)
  • Set default proxy configurations
  • Package other XPIs with your distribution
  • Disable about:config

Note that if you customize Firefox using the CCK Wizard, there are certain restrictions on redistribution outside of your organization, especially if you add certificates. Read the Mozilla Foundation Trademark policies for more info, or contact licensing@mozilla.org.

And please let me know if you find any bugs.

Group Policy Extension for Firefox

I've been working with Cesar Oliveira from Seneca College to put together some initial attempts at group policy support. Here's his comment from bug 267888:

Since there doesn't seem to have been any communication from the assignee for
over a year, I am guessing that he is no longer working on it. With big help of
Michael Kaply (mkaply), we went into a different approach with this bug.

Instead of doing our own ADM template, we decided to do an implementation using
generic IE policies (gpedit.msc) that both browsers can share. For example,
setting the home page and enforcing full screen, and even disabling tabs! This
won't be the best solution, because Firefox and IE are different in many ways.
But it gives us something to start with, as IE is already in the corporate
world, we might as well try imitating some of their success ;)

We haven't implemented every policy (only slightly over a dozen). And it
definitely needs some polish to the functionality and the code. There are some
ways to get around certain policies (we don't do any preference locking), but
it is certainly better than not moving forward.

The code was designed to go into the mozilla\extensions directory. It works
with the latest version of Firefox3 (Firefox3.0b5pre), but not Firefox 2
(started using fuel). You can check out the source code via svn:
svn://cdot.senecac.on.ca/ff-ad/trunk

I am also making available an extension you can use. I haven't done much
testing with it, other than it installs and works with no tab browsing and
enforce full screen:
http://matrix.senecac.on.ca/~cdolivei/files/grouppolicy.xpi

I also made a list of policies that we implement. Please feel free to look and
give feedback.
http://spreadsheets.google.com/pub?key=pqlMBxIY5x3i2yeezToYGfg

So now I am requesting community feedback. What is going to stop this from one
day getting into the tree (I assume everyone on the CC list wants something
like this in)? Other than using IE's policies, of course ;)

I think I got everything. If something is not working, feel free to email me.

This is really a first step, but I hope people will try it out.

Firefox, Group Policy and Active Directory

One of the complaints that seems to come up a lot with regards to Firefox in the enterprise is the lack of support for management via Active Directory (using Group Policies). There have actually been a couple attempts to solve this including FirefoxADM and WetDog. There is even a company, FrontMotion, that makes custom Firefox MSIs that can be managed via Active Directory.

I decided I don't know enough about this area, so I've spent the past couple weeks investigating what Microsoft provides and the results actually surprised me: IE configuration via Group Policies seems to focus much more on customizing the browser(*) than it does on configuring individual preferences. Learning this made me wonder what exactly it is that people mean when the say that Firefox has a lack of support for Active Directory. Do they mean using Active Directory to manage install and updates? Or do they mean the types of customization that are provided via IE's Group Policy.

So I'd like to pose a few questions to my readers:

  1. Do you use Active Directory and Group Policy to manage Internet Explorer? If so, what policies are most important to you?
  2. Do you use FirefoxADM or WetDog to manage Firefox? If so, what features are most important to you?
  3. If support for Group Policies was implemented for Firefox, should it focus more on customizing the browser or setting preferences?

For more information on this subject, here are some links:

(*) By customizing the browser I mean things like removing printing, removing the help menu, removing view source, removing the context menu, preventing saving files to disk, removing the ability to open new windows, turning off tabbed browing, removing access to bookmarks, etc.