Another Great Article Submitted From Nick McSpadden:
After working with this for a bit, I’ve come up with a step by step installation process for Firefox 10 ESR + CCK deployment on Mac OS.
Firefox CCK Guide – Part I
Most of the information about add-ons that you’ll need is in Mike Kaply’s blog:
1) Install CCK Wizard in Firefox 10 ESR
2) Run and configure CCK Wizard the way you want
3) Save the CCK data into a “CCK” folder anywhere you’d like. This folder will contain:
- xpi/ directory
4) When done, open up CCK/xpi.config
5) Copy the contents of the id=<name> key – this is the name you provided when configuring the CCK addon. In my example, it is “firstname.lastname@example.org”.
6) Rename “xpi” folder into the ID key from Step 5
7) Inside Firefox, create: Firefox.app/Contents/MacOS/distribution/bundles/
8) Move renamed xpi folder from Step 6 into Firefox.app/Contents/MacOS/distribution/bundles/
9) Launch Firefox, enjoy CCK!
Now, this is means that Firefox needs to be specially packaged and distributed during deployment. While this is easy for first-time deployment, it does mean that future versions of Firefox will also require repackaging. If you want to avoid this, it means you’ll have to change Firefox’s addon scopes. If you’re already repackaging Firefox for the CCK as above, then it isn’t a big deal, use the instructions in Mike Kaply’s blog:
Firefox Changing Add-On Scopes – Part II
1) Make a text file named whatever you want as long as it ends in .js, such as “scopes.js”
2) Add these two lines to the file:
3) This file needs to be saved in Firefox.app/Contents/MacOS/defaults/pref/ (the blog suggests it should be defaults/preferences/, but for me /prefs/ was already created)
4) Now user scopes are changed to the settings above.
However, if you want to avoid repackaging Firefox completely every time an update or a change to your CCK configuration comes out, or you want to have different CCK settings for each user on the system, you’ll need to change things up a bit. One way or the other, you’ll need to change the Addon Scopes, because FF10’s defaults lock out the extra directories. If you don’t want to rebundle/repackage Firefox 10, you can use any script to add in the preferences you need into Firefox.app. You can do it simply with echo:
$ echo -e "pref("extensions.autoDisableScopes", 0);npref("extensions.enableScopes", 15);" > /Applications/Firefox.app/Contents/MacOS/defaults/pref/scopes.js
(obviously double check to make sure the .js file can be read by Firefox, although I didn’t have to do anything for it to work)
Doing this allows Firefox to use any of its valid locations for extensions, listed here:
In other words, you’ll want to move and rename the “xpi” folder from the CCK Guide Step 6 into this location if you want it to affect all users:
This unpacked folder (from CCK Guide Step 4) contains the xpi contents:
…and so forth.
Use this location if you want it to affect individual users only:
I. For an individual user, I’d need to change Firefox’s addon scopes, and I’d need the unpacked xpi contents located here:
II. For all users, but not packaged within the application itself, I’d need to change Firefox’s addon scopes, and put the unpacked xpi contents here:
III. For all users, who will be unable to disable or even see the add-on, inside the Firefox.app bundle itself, I don’t need to change addon scopes. I just need to put the unpacked xpi contents here:
That’s how you get the CCK configured and installed in its various permutations on Mac OS X. I hope that helps anyone who was struggling or thinking about adopting the Firefox 10 Extended release into their deployment strategy, as the CCK is a great tool for preconfiguring Firefox to suit your enterprise’s needs.
“But wait!” you might say. “How do I perform an enterprise-level deployment with this method?” See my post here for details on incorporating this into Munki: http://krypted.com/mass-deployment/deploying-and-managing-firefox-part-2-working-with-munki/
krypted May 18th, 2012
Posted In: Mass Deployment
Browser, deployment, Firefox, MCX