Custom Drive Icons in Mac OS X

This makes it much easier to understand which drive it which!

This makes it much easier to see which drive is which!

I previously wrote about the benefits of custom drive icons, which can help you to keep your removable and internal drives straight, and how to create them on Windows Vista. Well, Mac OS X surprised me by using the same generic icon for every drive, so I set about figuring out how to customize them here, too.

It turns out it’s not only simple to do, but illustrates an odd way in which Apple implemented their split resource/data fork filesystem idea in a GUI. This exercise taught me a lot - what an ICNS file is, how Apple stores drive icons, what a droplet is, and how to use GIMP on a Mac.

This is part 1 - where I’ll go over the basics. Part 2 covers custom Boot Camp drive icons and other troubles.

The default icon for an internal disk drive in OS X isn't exactly clean and friendly

The default icon for an internal disk drive in OS X is not exactly friendly

OS X is pretty clever and consistent in how it handles drive icons. It simply looks in the data fork of the .VolumeIcon.icns file in the root of the drive for an icon resource of type icns, and uses that icon. If it can’t find such a file, it uses one of default icons, designed to suggest either an internal or external (USB or FireWire) drive.

As a new Mac user, I was surprised at the unfriendly look of the default icons. While external drives get a decidedly iPod-generic white shell, internal disks look like, well, bare disk drives. Which is something most Mac users will never see, since most Macs are locked down tight. I expected a Finder-esque smiley face or an image of the machine itself.

Creating an Icon

So let’s create an icon! For my example, I’m assigning a custom icon to a PQI Intelligent Stick mini USB flash drive. If you already have the icon image, you can skip ahead. Otherwise, read on to learn how to create a drive icon.

  1. Locate a good picture of the drive. I went to PQI’s web site and downloaded their publicity image.
  2. Now we’re going to clean up the image. I used Wilber Loves Apple’s version of GIMP (the best GIMP I could find)
  3. In GIMP, I added an alpha channel (for transparency), and then used the magic wand (with feathered hair edges) to kill the white background.
  4. I added an alpha channel and removed the background in GIMP

    I added an alpha channel and removed the background in GIMP

  5. I then saved it to the desktop as a PNG file.
  6. Next, I converted the PNG into an icns using img2icns
  7. img2icns converts PNG files to icns format

    img2icns converts PNG files to icns format

  8. Finally, to make sure it was the right resource type, I converted the icns file to use itself as its icon using IconDroplet
  9. IconDroplet simply makes an icns into a droplet of itself

    IconDroplet simply makes an icns into a icon of itself

  10. Now I had a perfectly-formed icns resource, ready for use!

Assigning the Drive Icon

Now we can assign the drive icon to the drive. Note that the drive has to be writable for this to work, which generally means it has to be HFS+ or FAT. I’ll cover adding icons to NTFS and Boot Camp drives later. 

  1. Right click on your drive and select “Get Info”
  2. Leave that inspector up and right-click the icon file from IconDroplet and select “Get Info”
  3. We will copy and paste the icns resource using these inspectors

    We will copy and paste the icns resource using these inspectors

  4. Now we will just move the icns resource from one to the other. Select the desired icon in the upper left corner (not the Preview down below) so it has the blue fuzzies around it and use command-c to copy it.
  5. Now select the one you wish to replace in the other inspector (check for the fuzzies again) and use command-v to paste.
  6. Now the drive has the new icon assigned

    Now the drive has the new icon assigned

  7. If all went well, you should now have a custom drive icon installed!

So there you have it. You should be able to use this method to assign custom drive icons all day long, as long as the media is writable. I was amused at how Apple uses the inspector windows to assign icons - where Windows would have some buttons to click, OS X is drag and drop. It may be intuitive, but it’s certainly not obvious - even Apple has to have a document describing the process!

Share this post:
  • Digg
  • del.icio.us
  • StumbleUpon
  • Technorati
  • Reddit
  • Google
  • Slashdot
  • Facebook
  • Pownce

You might also want to read these other posts...