Ok, Here's another one.
I had to bundle firefox as part of a solution we are providing.
We have a bootable CD I've buit myself.
The CD'll install all the software we want to bundle so no need for the firefox installer.
We wanted to add the Arabic translation XPI with the locale switcher extension.
I thought about adding the .mozilla directory to the /etc/skel. Unfortunately, This didn't work for me as firefox is hardcoding the path for the chromes. So if I copy it to another home directory it doesn't work.
1st get the firefox tarball from mozilla.org "The tarball not the installer" and unpack it.
2nd cd to the directory where you unpacked it, install the extensions and customize the default profile.
3rd re-pack the tarball again and you have it!
OK. How to achieve the 2nd step ? Firefox offers a command line switch "--install-global-extension" and another one "--install-global-theme"
So, for every extension you want to bundle, Just do:
./firefox --install-global-extension /full/path/of/the/XPI
And that's it.
Now let's customize the default profile:
You need to run firefox, Adjust what you need. then copy
where "XXXXXXXX" is a random string generated by firefox.
before re-packing the tarball.
And that's it!