Tag Archive

Some basics of DEPNotify and a sample script


Posted on July 15, 2020 by alanysiu

If you’ve been doing Munki admin’ing for a short while, you’ve probably heard people talk about DEPNotify, whose README says is “a small light weight notification app that was designed to let your users know what’s going on during a DEP enrollment.”

Aforementioned DEPNotify README is fairly comprehensive in terms of going over all the options. There’s also a project called DEPNotify-Starter, which has a sample script that’s, as of this writing, 827 lines long.

If you just want a super simple script to launch up DEPNotify and have it install some Munki stuff, I created a very, very simple sample script (DEPNotifyMunkiSample.sh) that just shows how you can use it without a ton of extra options. Once you wrap your head around that, you can always complicate it with more options.

This is what the sample script looks like in action if there’s only MunkiAdmin to install:


0

Fixing DEPNotify GUI not launching with keyPath error


Posted on July 8, 2020 by alanysiu

I’m not sure how my computer got into this funky state, but I was playing around with a DEPNotify script, and after a while, I was suddenly getting these errors every time I tried to run it:

DEPNotify[12422:409983] Failed to set (keyPath) user defined inspected property on (DEPNotify.WindowController): [ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key keyPath.

DEPNotify[12422:409983] Failed to set (backgroundColor) user defined inspected property on (DEPNotify.ViewController): [ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key backgroundColor.

I tried rebooting my Mac. That didn’t make the problem go away. I tried creating a new user account, and that didn’t either. It didn’t matter whether I ran my script or just manually invoked DEPNotify with a single command. The screen would flash briefly, as if something were launching, but there was no DEPNotify window, and it wasn’t hidden or minimized.

When I did a Google search on the error, the only real results were someone not using the -fullScreen option properly two years ago and another case in which a script that starts DEPNotify just needed an update.

Unrelated to my problem (which I asked helped for but got no response), Arek Dreyer on the MacAdmins Slack (thanks, Arek!) was responding to someone else’s problem with the depNotifyReset.sh script. I didn’t run the script but tried to run the individual commands.

What ended up fixing it for me was sudo rm /var/tmp/depnotify.log and then killall cfprefsd. Then DEPNotify was functioning again!


2