Benjamin Schieder


2007 June 07

If you are a package maintainer for Firefox and want to package some add-ons with FF automatically without having to start Firefox, here's how you do it.

First, download the .xpi file. It's actually just a ZIP archive. Create a temporary directory and extract it there. You will find a file called install.rdf which contains all the necessary information. Here an example from AdBlock:

<?xml version="1.0"?>

<RDF xmlns=""

<Description about="urn:mozilla:install-manifest">


<!-- Target Application this extension can install into,
with minimum and maximum supported versions. -->

<!-- FireFox -->

<!-- Mozilla -->
<... some more stuff omitted ...>

What you need are the two bold parts. First, take the first bold part (the global em:id, NOT the one within a em:targetApplication block!). Rename the directory you extracted the .xpi to to that (in this case, we would rename it to {34274bf4-1d97-a289-e984-17e546307e4f}.
Then check if your Firefox version is newer than the second bold part. If it is, and you are sure that they are compatible, change the part to your Firefox version. In my example, I changed 2.0a3 to

Now, move the folder {34274bf4-1d97-a289-e984-17e546307e4f} to the global extensions directory of Firefox. Here it was /usr/lib/firefox-

Et voila, the next time a user starts Firefox, he will have AdBlock preinstalled :-)


Category: blog

Tags: Tech