Follow @digitalpardoe on

Setting Hard Drive Icons In OS X

Another day and I’m finally getting around to writing another tutorial. This time I thought I concentrate on something I’ve had quite a lot of emails about, ’you’ve given me the icons, how do I go about using them’. I suppose it’s quite an important thing, if your supplying people with something, to tell them how to use it. (Warning: this is a Mac only tutorial).

In previous version of Mac OS X, before Leopard you could get away with applying HD icons though copy and paste alone, and from that point on everything would work fine. Unfortunately, one of the first things I noticed about applying HD icons in Leopard is that copy and paste gives bad results, especially for the scaled down versions of the icon in the new Finder sidebar.

I eventually found the correct way to apply the icons, it involves a little bit of Terminal usage but don’t be afraid. (I have a sneaking suspicion you may also need the Apple Developer Tools installed, these should have been included on your Leopard DVD). I believe this tutorial also applies to setting HD icons on previous versions of Mac OS X.

The first command we will execute in the Terminal copies the icon resource (.icns file) to the correct place on the target HD. You will need to fill in the paths in a way suitable for your system but you can do this by dragging and dropping onto the terminal window.

sudo cp -f /Path_to_Icon/icon_file.icns /Path_to_Drive_Root/.VolumeIcon.icns

Not too difficult was it. The next line will tell the HD to accept a thrid-party icon.

sudo SetFile -a C /Path_to_Drive_Root

The final line will restart the Finder so you can see the changes.

killall Finder

And that’s it. You should see your new icon in the Finder and the correct scaled down version in the Finder sidebar.

Hope you get it working. Check back soon.

Update: After many emails I have written a small utility called Set Icon that automates this process, if you are not feeling confident with the Terminal commands you can download it here.

Update: I’ve just got my hands on a copy of Snow Leopard and the above instructions still seem to work correctly, happy icon changing.