Add-ons in the Distribution Directory
Recently in response to this post about integrating add-ons into Firefox, I was asked why some add-ons don't work properly in the distribution directory. That's a great question and it deserves its own post.
The answer is that add-ons in the distribution directory are not loaded like normal add-ons. All that happens is that their chrome.manifest file is loaded and read. They are never integrated into Firefox's add-on manager. That means that if the add-on uses tries to use the AddonManager API, it will fail.
So if you search through the add-on and see that it depends on APIs like getResourceURI and hasResource, it will probably not work in the distribution directory. Keep in mind, though, that just because you see a reference to these APIs doesn't mean that the add-on will break; the CCK uses this API, but has code around it just in case it fails.
If you find an add-on that doesn't work in the distribution directory, the best course of action is to put it in the extensions diretory where the executable is located. Those are loaded like normal add-ons.
As a side note, I'm going to try to use this post to kick off a Q&A series to try to encourage me to blog. If you have ANY questions about customizing Firefox, send them my way.
Hello Mike,
I am stumbling over your web page again and again, looking for a solution to customize Firefox (ESR) ... but it seems, that there is still no way to disable the installation of extensions by normal users?! If you have any news/ideas about that issue, I (and a lot of other sysadmins) would really appreciate to read about!
Greetings from Germany,
Lasse
So to disable installing extensions, you can lock xpinstall.enabled to false. If you need to allow specific sites to install extensions, I've written this post about that:
http://mike.kaply.com/2013/02/18/allowing-only-certain-sites-to-install-add-ons/
Please contact me if there's something else that you need help with.
Hi Mike
Where do i add my custm cck xpi for a global add on. I used to put it in the distribution drectory but now since 17.0.2 ESR this doesnt work.
All of Mozillas documentation is out of date
This should still work. I've emailed you to see if we can get it figured out.
I am new to working with add-ons in firefox. Do you have any idea how I can load the add-ons in a global vmware enviornment? From what I have read and understand it appears Mozilla disabled this capability.
I would need some more detail on exactly what you are trying to do. Mozilla does provide a way to install add-ons globally, they just disable them by default. You can check this post: http://mike.kaply.com/2012/02/21/understanding-add-on-scopes/ for info on how to explicitly enable global add-ons.
Hi Mike,
firstly, thank you for a great ressource about the beloved Firefox browser. I successfully managed to do a fully unattended customized installation thanks to this blog and there's just one hitch I consider annoying:
I favour your scenario 3 to provide (configured) add-ons with Firefox 19. A few of them keep opening tabs when Firefox is launched the first time (Adblocker Plus, Greasemonkey, Stylish), I'd like to override this behaviour globally (no simple prefs.js entries to change).
Do you have an idea how to do this?
So in order to stop this, you need to find the preference that these various add-ons are using to display their first run pages and then set those preferences yourself.
My suggestion would be that you create a new profile and then go to about:config and sort based on "Status". See which preferences are user set. Then install the add-on and you'll see which preferences it changes. Experiment with turning them on and off to see what makes the startup page reappear.
bookmarks created with cck wizard do not take effect if put in the distribution folder of the app bundle!
What version of the CCK are you using?
Make sure you are using the latest here:
http://code.google.com/p/chromium/downloads/list
I have tried to put the add-on from the link in both C:\Program Files\Mozilla Firefox 17 esr\distribution\bundles\ and C:\Program Files\Mozilla Firefox 17 esr\extensions\, both packed or unpacked, but it doesn't do the trick. It works when you install it normally in Firefox 17 esr.
Are there any other tricks?
I am trying to build some kind of kiosk mode to discourage browsing and I don't like the kiosk add-ons while it hides the whole screen.
TIA
I manage Firefox installs in a managed environment. I'm trying to move beyond simple prefs.js-style configuration to using full CCK-style customization. Love the CCK wizard but I can't find a way to install the resulting add-on in a silent manner. If users have existing profiles (so, all current users) the add-on manager prompts the user to install the CCK-built add-on and I can't find any way to suppress this. I've found plenty of suggestions but I can't get any of them to work on FF 17.0.4 ESR (and yes, I know this is not the current release -- I want to get customization working before pushing out 17.0.5 to all OSX users).
This is on OSX with FF installed via Munki.
Any thoughts? Anybody?
Thanks!
-Josh
Okay - I think I've figured it out. I think I wasn't adding the scope properly. Here's what I did and it seems to work (but I've only testing on one machine... will test more later).
1) create defaults/pref/local.js and point it to a local config file:
pref("general.config.obscure_value", 0);
pref("general.config.filename", "firefox_local.cfg");
2) Put the scopes config, etc. into the .cfg file and *NOT* in the .js file:
pref("extensions.enabledScopes", 15);
pref("extensions.autoDisableScopes", 0);
3) Install the CCK-made add-on into the system-wide extensions directory
(On OSX this is /Library/Application Support/Mozilla/Extensions )
In my case, the add-on was active in Firefox without prompting the user.
Hello Mike,
Have you ever studied the firefox mobile(android)? Now I want to make a custom browser integrated my own add-ons based on the firefox. Could you give me some help?.
Thank you very much!
No, I haven't done any investigation into repackaging android.