Unfortunately, the copy'n'paste method, as easy as it is, just will not work on everything. Certain applications, including some of the Apple apps like Mail or System Preferences will 'change back' at what seem to be completely random times. "WTF?" you ask, since you're not a particularly eloquent sum'bitch.
Well, what's happening is this: some applications come with an icon file inside the .app package itself, and automatically call that icon back when another application (like the Dock or the Finder) attempts to display them. Now, if you call up the application's Get Info window in the Finder, you'll probably still see your pasted icon - it simply won't display. In point of fact, it may even come back after a while (this is particularly common, in my experience, with the Application folder itself). But that's simply not good enough, right? So how do we resolve this issue?
These are what I call persistent icons, and this tendency is generally limited to Applications (and the Application folder itself - though permanently changing its look requires us to work with System files, and so won't be discussed until the third and final section). Without going too deeply into exceptions or particular applications, it's enough to know that if an icon changes back the the original without prompting on your part it's being persistent, and its icon can be permanently changed as follows:
Finding the Original .icns File
As aforementioned, when these applications attempt to display themselves in the Dock or Finder, they'll call on their interior icon file - one that ends with the suffix .icns. We'll begin by opening the .app package and locating this persistent icon. For these purposes, we'll change Apple's Mail icon.
In the Finder, navigate to your Applications folder (it may be listed in your sidebar - or you can alternately press CMD+Shift+A to go directly there). Find the program whose icon you're looking to change, Control-Click on it to bring up its contextual menu, and click on the Show Package Contents item. If this sounds bizarre to you, check out this link to learn more about application packages in OS X.

After opening the package, open the folder Contents and its subfolder Resources. In here are (normally) stored all associated icons, splashscreens, and other visual components of the software. All of these can, conceivably, be changed by the user, but we're here to hunt down the icon itself. Within this Resources folder you should see the application's default icon - a file with the extension .icns. It may be named just about anything, but it should be plainly obvious what we're after here. In Mail's case, it's app.icns.
Preparing The New Icon
Note: if you've downloaded a set of icons for a program like Mail, which is well-known for requiring .icns formatted icons, said icons may already be in .icns format. In such cases, you can skip this step.
Now that we've located the persistent icon, we can prepare to replace it with one of our own. For this, we'll need to convert our downloaded icon (which is normally in .png form, but could also be in any of several other OS X-specific formats) to an .icns file (products like the much-touted CandyBar may negate the need for this step - but the whole point is to do this for free, right?). To do this, we'll be using Icon2icns. Download, install, and run the program. When Icon2icns appears in the Dock (all you'll see is the icon - there's no GUI to speak of), we're ready to make an .icns icon.
Find the new .png icon that you wish to use for the program, and drag-n-drop it onto the Icon2icns program in the Dock. Magically (no, really!), a new file will appear in the same folder (or on the desktop; wherever you dragged from) - it's your icon, but all of a sudden it's being trailed by an .icns extension! Now we're ready to backup the application's old icon and replace it with the new one.
Replacing the Icon
Because we're responsible users and something could, conceivably, go wrong, we'll backup the old .icns file. Since administrative users (I'm assuming this is you - if it's not your computer, you shouldn't be messing with this stuff!) have read & write access to all .apps, we should be able to simply click on the original .icns icon and press the enter key to rename.
For several reasons involving ease of use, just append 'Backup' to the file name and press enter to apply the change. Hence, 'app.icns' would become 'appBackup.icns.' Now not only do you know what file the application looks for (after all, the new icon must be named exactly that!), but you can also easily locate and rename the icon from the command line if you ever need to restore to the original (while changes like these should have no chance of impacting system stability, it's always better to be safe than sorry).
Finally, we'll change the name of our new icon to match that or the original ('app.icns,' in this case) and drop it in the Resources folder as a replacement (in that order or vice-versa - as long as you do both, it doesn't matter which comes first). It should show up right next to the backup (another good thing about this naming scheme).

Results
...And that's that! Not so bad, huh? You may want to log off or restart the computer (certainly the application itself!) to see the changes. With persistent icons like these, you shouldn't need to change that .app icon again (as seen with the copy'n'paste method) - it should change for you when the new .icns is loaded (prompted, again, by a restart or login).
Even so, nothing's foolproof. If you've restarted and the .app icon still isn't right in the Finder or Dock, you may want to use the copy'n'paste method as well. Furthermore, it may help to drag the application out of the Dock, and then back in from your Applications folder.
Finally, there's a chance that you still won't see the new icon in the Dock, due to the Dock's icon cache. This is usually resolved after a reboot, but alternately you can navigate to /Library/Caches and delete any file starting with com.apple.dock.iconcache, then log out and back in. This will ensure that the Dock rebuilds its cache and pulls up the new .icns file to display! Huzzah!
If you're ready for the Bigtime check out the next section, where we'll be changing:
The Finder IconSee ya there!
The Trash Icons
Generic Folders
System Folders
& That Pesky-Ass Applications Folder Icon That Always Changes Back in the Sidebar!
No comments:
Post a Comment