Skip to main content

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/

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


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


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


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.


All the reason more to stick to the ESR versions!


"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.


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


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



Sorry, my bad!


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...


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/

oops


Nice pickup @bmccune thanks!


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


@jwojda][/url



external image link


Thanks Ben!!


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.


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


@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.


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


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.


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


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.


@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.


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


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


Reply