FYI - Firefox 34.0.5 and CCK 2 AutoConfig Files

tim_c_arnold
New Contributor

Firefox 34 handles the CCK AutoConfig Files differently than previous versions. Once the AutoConfig files are generated you will need to place them in different places than just /Applications/Firefox/Contents/MacOS/

The "cck2.cfg" file and the "distribution" directory should be placed in

/Applications/Firefox/Contents/MacOS/

Then place the "Defaults/prefs/autoconfig.js" file in

/Applications/Firefox/Contents/Resources/defaults/prefs/

46 REPLIES 46

andyinindy
Contributor II

Nice tip!

I suppose that now I need to incorporate a version check so that I put the files in the right spot for Firefox 34. Joy.

Also, you had a slight typo in the path for the autoconfig.js file. Should be "pref" without the "s".

Cheers,

--Andy

calumhunter
Valued Contributor

that sucks
FYI v33 on the left and v34 on the right. Looks like they have moved most of the files from MacOS to Resources.

http://i.imgur.com/3swdLrD.png
external image link

calumhunter
Valued Contributor

Another tip, if you are using the override.ini file to bypass the import from safari etc etc dialog box
this also needs to be moved in to resources/browser
http://i.imgur.com/vpw0qAd.png
external image link

jwojda
Valued Contributor II

thank you for the heads up and the resolution! All too often I take these constant updates as minor and with minimal testing. Then they throw a wrench in it like this.

ctangora
Contributor III

All the reason more to stick to the ESR versions!

gregneagle
Valued Contributor

"All the reason more to stick to the ESR versions!" <--- but the changes will show up in the ESR versions eventually, so you'll have to deal with them eventually.

daz_wallace
Contributor III

In case it's any help, over the last year or two, I've knocked up a few blog posts on how to lock down Firefox. first Manually, then using CCK2:

http://www.amsys.co.uk/2014/blog/locking-firefox-cck-2/

As well as using an EA to detect if it's installed (in case a pesky user manages to replace the app or remove the lockdowns):

http://www.amsys.co.uk/2014/blog/firefox-cck2-lockdown-casper-extension-attributes/

Hope they help

Darren

daz_wallace
Contributor III

Edit: I realise I have yet to update it for the new version of Firefox discussed above.

Sorry, my bad!

andyinindy
Contributor II

Is it just me or did Mozilla release 34.0.5 and then replace it with 34.0?

*EDIT* OK, weird, I must not have restarted firefox lately on my machine. I am on 34.0.5 now. Carry on...

bmccune
Release Candidate Programs Tester

Just updated to Firefox 35.0 and was getting a "Failed to read the configuration file" error. I was able to figure out that as of 35.0, ALL of the CCK files need to go into the Resources folder. Nothing needs to go into the MacOS folder anymore.

So now the "cck2.cfg" file and the "distribution" directory should be placed in

/Applications/Firefox/Contents/Resources/

The "defaults/prefs/autoconfig.js" file in

/Applications/Firefox/Contents/Resources/defaults/pref/

And the "browser/override.ini" file in

/Applications/Firefox/Contents/Resources/browser/

htse
Contributor III

oops

calumhunter
Valued Contributor

Nice pickup @bmccune thanks!

jwojda
Valued Contributor II

can you post a screen cap of how it should look? I moved the files, but now FF just opens and closes itself.

bmccune
Release Candidate Programs Tester

tim_c_arnold
New Contributor

Thanks Ben!!

bpavlov
Honored Contributor

I tried following the guide on Amsys and I'm not sure if it's because things have changed (again?) but I just get an error saying "Firefox is damaged and can't be opened. You should move it to the Trash." when I try to open Firefox. CCK is now on version 2.0.21.1 and Firefox is on version 37.0.1 so I'm not sure if things have changed once again. I'm reading through the blog ( https://mike.kaply.com/ ) for the creator to see if I can pick up if something has changed that may be causing this. I'll also try and use the version of Firefox that was used in the amsys post just for troubleshooting sake.

daz_wallace
Contributor III

Hi @bpavlov

Are you using the latest blog I did on the subject?

It's a little bit behind now (version 35) but it may help. If not then I would think that things may have changed again (sigh).

Another option is Greg Neagle has done an AutoPKG recipe that can grab the lastest firefox and dump a CCK2 file in for you. I don't have the links but it might be worth checking out?

Darren

bpavlov
Honored Contributor

@daz_dar Indeed I have. Since you wrote the blog, is it possible if you could reproduce it using the latest version of CCK and Firefox available now? I just want to confirm that I'm doing something wrong versus there being a change in Firefox/CCK.

daz_wallace
Contributor III

Hmmm....I'm getting the same error. Looks like things have changed again.

I'd still suggest Greg's AutoPKG recipe is the way to go.

At some point I'll get round to digging further and fixing the blog.

Darren

bpavlov
Honored Contributor

So I tried to change Security settings in OS X 10.9.5 so that "Allow apps downloaded from:" was set to "Anywhere" (rather than "Mac App Store and identified developers"). And I got a bit further now. The app does attempt to launch now but I get another error message:
"Failed to read the configuration file. Please contact your system administrator."

Honestly, I'm beginning to wondering if it's worth at all to even try using CCK2. It sounds like Mozilla will also be removing some of the features that CCK uses to implement its customization as they consider it a security issue. More can be read about it here: https://bugzilla.mozilla.org/show_bug.cgi?id=1144127 and https://mike.kaply.com/2015/04/07/the-future-of-cck2/

Honestly all I want to do is just stop Firefox from auto updating and maybe set the homepage. Adding the bookmarks is a plus, but ultimately those can change from time to time (plus we put up shortcuts in Self Service anyways). I'm not trying to customize or lock things down much. ESR is a possibility but wouldn't fly with our developers because ESR doesn't get updated all that frequently with new web features (only security updates). And I'm not trying to manage two versions of a web browser.

daz_wallace
Contributor III

Hey @bpavlov

Sorry, it's Friday afternoon here and I forgot to check for Gatekeeper on my test VM! I remember now that Mozilla are now signing the .app bundle and once we start messing around inside it, it'll fail the signing enforced by Gatekeeper. As soon as I disabled it, my test Firefox with CCK worked fine.

One extra point, did you also dump in the "cck2.cfg" file in the bundle?

Darren

bpavlov
Honored Contributor

Ok another quick update: I got it working. I still have my reservations about this

For CCK 2.0.21.1 and Firefox 37.0.1:
1. I made the changes I needed in CCK2 and got the autoconfig.zip. Uncompressed it.
2. Moved the "profile" folder in /pathto/autoconfig/browser/defaults/ to /Firefox.app/Contents/Resources/browser/defaults
3. Moved the "cck.cfg" file located in /pathto/autoconfig/ to /Firefox.app/Contents/Resources/
4. Moved the "autoconfig.js" located in /pathto/autoconfig/defaults/pref/ to /Firefox.app/Contents/Resources/defaults/pref
5. Moved the entire "distribution" folder located in /pathto/autoconfig/ to /Firefox.app/Contents/Resources/

I think part of the problem may have been that I was copying certain folders over and perhaps there were permission issues. I'm guessing depending on what options one chooses in CCK there may be other files and folders that get generated that need to be moved over.

My previous comment still stands that I'm not sure what's going to happen with CCK in the future if Mozilla goes the path they are in terms of the "security holes" they want to close. Essentially they argue if it can be used for good then it can be used for bad (there's merit to that argument of course). I just wish things were a bit simpler and that they used a regular plist file to manage their settings like other third parties tend to do. Would certainly make things easier to manage settings from an enterprise perspective using profiles.

bpavlov
Honored Contributor

@daz_dar I wasn't initially moving cck2.cfg but then I noticed in some of the screenshots that you did move it over, but never mentioned it in any of the steps. Great job on the screenshots!

Just out of curiosity, what's the best to deploy this app if Firefox is signed and I have Gatekeeper on? I did notice that if I disable Gatekeeper, open up modified Firefox, then disable Gatekeeper, Firefox will open successfully. I'm going to test and see if I can deploy that now and package it up using pkgbuild. I suspect it may not work as there's probably an exception now in this VM's gatekeeper database allowing this app to run unsigned. Perhaps I may need to do spctl -add to get this unsigned app allowed to run after deploying it. I'm just thinking aloud here.

Just another little tidbit I suppose to be aware of for anyone that runs into this thread in the future.

daz_wallace
Contributor III

Shame I didn't check the screenshots and the directions! Fixed now : )

Not what I've tried but I think you are correct, as soon as you move the modified application to another Mac then Gatekeeper will complain and prevent it from being launched.

I'm guessing there may be a possibility of re-signing your new application but I'm afraid I don't know for certain.

Darren

Aziz
Valued Contributor

Firefox will remove support for distribution/bundles in Firefox 39 and ESR 45.

https://mike.kaply.com/2015/04/07/the-future-of-cck2/

https://bugzilla.mozilla.org/show_bug.cgi?id=1144127

RobertHammen
Valued Contributor II

The end of the "Easy" way of CCK2 is forcing a couple of clients of mine to migrate to Google Chrome.

Aziz
Valued Contributor

@RobertHammen I had a meeting yesterday and we came to the conclusion to drop support for Firefox. It will be an optional download in Self Service, but it won't be updated often unless Mozzila changes their mind.

Edit: With the recent changes in Chrome, we might have to roll back that decision.

CasperSally
Valued Contributor II

@RobertHammen it'll be interesting to see how the loss of NPAPI plug ins plays out for Chrome. I've never seen a chromium thread go on and on like this one

CasperSally
Valued Contributor II

oops posted wrong link earlier Correct Chromium NPAPI link

McAwesome
Valued Contributor

@daz_dar Do you happen to know if there is a JSS recipe for that? I'd like to use it, but I know how annoying it'll be to have a different process for one and only one package everytime Firefox updates. It'd be great if I can get it into the same kind of workflow I have for every other package made by AutoPkgr.

daz_wallace
Contributor III

Hi @McAwesome

There's not a JSS recipe but there is a .pkg one by @gregneagle that works awesomely. It'll spit out a standard pkg with the version number already part of the name. It's not too much work to upload this and modify your smart groups and / or policies.

However if you're running the newer versions of AutoPKG (the exact version escapes me) you can use the 'autopkg search' command to look for Firefox recipes and see what it has.

Last option is to have a crack at a .jss recipe that'll take the output from greg's one and import it into your JSS?

Time permitting I may even get a chance to have a go!

Darren

MarcosMunoz
New Contributor III

Has anyone gotten this to work for Firefox 38.2 ESR? Using CCK 2.1.1 and the Distribution folder no longer exists. It also looks like the location of the files has changed as well. Thanks.

CGundersen
Contributor III

Perhaps your version of CCK ... try to find v2.1.1.6

Always a moving target. As mentioned a bunch earlier in thread, Greg Neagle has a autopkg recipe that (with some overrides) will help automate. He has an article in a recent MacTech (#350) that is a good history lesson/overview.

edit: still seems to work with Firefox ESR 38.2.0 and AutoPkg(r) recipes ... our CCK customization needs are modest though.

Get autopkg(r) installed with repos containing Firefox and FirefoxAutoconfig recipes. (make-override)s of aforementioned recipes. I recall just editing the Firefox.pkg.recipe override and changing the release key string to "latest-esr" ... then make sure your CCK-generated "autoconfig.zip" is in the directory of your recipe overrides.

Kaltsas
Contributor III

IS anyone having issues with ESR 38.3? My process that was working fine through ESR 38.2.1 causes ESR 38.3.0 to not boot. Were there changes in 38.3.0 that my googlefu is not finding?

CGundersen
Contributor III

Still working/launching for me with 38.3.0, but our changes are modest (setting default home page, setting a few bookmarks and changing to Google search). autoconfig.zip was built using CCK2 - v2.1.1.6 and 38.2.0, but still seems to work fine against 38.3.0. At some point I'll try updating to CCK2 - V2.1.1.7 (latest CCK2 release I think and rebuild with 38.3.x), but so far so good.

Kaltsas
Contributor III

I am only setting the home page and inserting our proxy certificate.

I put cck2.cfg at /Firefox.app/Contents/Resources
I put autoconfig.js at Firefox.app/Contents/Resources/defaults/pref
I put cck2 distribution bundle at /Firefox.app/Contents/Resources/distribution

Is there something you think I am missing? This was built with CCK2 2.1.1.7.

Kaltsas
Contributor III

I am such dumb and put the bundle at /Firefox.app/Contents/Resources/distribution not /Firefox.app/Contents/Resources/distribution/bundles

donmontalvo
Esteemed Contributor III

Looks like this Spring will be a good time to put Firefox ESR to rest.

https://t.co/uEAPSADiTk

--
https://donmontalvo.com

apizz
Valued Contributor

Don't know if I'm too late to the Firefox party, but today I tried to install our custom distribution using cck2, but when finish and at the autoconfig.zip file, when I unzip it it only has the following folders:

bbbdc5d4ef214443a059166905f940da

As you can see, I have no distribution folder. I've tried to follow the initial instructions from the Amsys blog here and the addendum blog here, so I'm not sure why I don't have this folder.

Any ideas?