Manually adding icons to Munki-imported packages

As with all Munki tutorials, this one assumes you already know some Munki basics. If you don’t, you might want to start with Absolute beginner’s guide to setting up Munki (not monkey).

When you use munkiimport to import software packages, it will either find icons automatically or prompt you to try to extract icons from the package. In some cases, the extraction doesn’t work, and you may have to create an icon manually.

First, go into your munki_repo and then within the pkgsinfo subdirectory, find your package info. As an example, we’ll use Inkscape. Open it up in a text editor (e.g., TextWrangler).

What we want from this is the name of the package (which may be different from the display name). The name here is Inkscape, so that’s what we’re going to call the .png file we create.

Alternate Method to Find Names: If you run

sudo managedsoftwareupdate -vvv
on your server on a client machine, you can see all the names of the .png files that did not download because of a 404 (not found) message. This may be quicker, actually.

Mac software packages usually have a .icns file for the icon, but Munki is looking for a .png, so we’ll do a conversion.

On a computer that has installed the program you want (in this case, Inkscape), you want to run something like the following command:

sips -s format png /Applications/ –out /Users/Shared/munki_repo/icons/Inkscape.png
If Inkscape is not installed on your Munki repository server, you can just output it to somewhere else temporarily and then put it in the munki_repo’s icons folder later.

Then, if a user launches up Managed Software Center, she should see the new icon associated with the software package, instead of the generic placeholder.

Troubleshooting Suggestion: If your icons still aren’t showing up, and you’re 100% certain the name matches, the permissions may be wrong. I thought 644 on the icons directory content would be a enough (read/write for owner, read for everyone else), but I had to change it to 755 recursively to get all the icons to work, for some reason.

More details at the Munki Google Code page about icon guidelines.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.