Changing file-types icons in OS X?
July 25, 2007 11:26 PM   Subscribe

In OS X, how can I change the icon associated with a specific file type/extension?

I'm shocked and embarrassed that I have to ask this question here. I apologize in advance if I'm ignorant of something really basic, but I've Googled this problem 5 ways from Sunday with no useful results.

I'm running 10.4.10. I have CandyBar. I use MPlayer to play .rmvb (RealMedia Variable Bitrate) files, but when I changed the default application for the file-type, the icon changed from the RealPlayer icon to the OS X default/blank-terminal-window-looking icon rather than the MPlayer video icon that all other video file-types display. I know how to change an individual file's icon, but I have no idea how to change the icon for all .rmvb files.

I know how to use CandyBar to change the document icons associated with a particular app, and I tried changing MPlayer's "video" icon a few times, but that didn't affect the .rmvb files, only the file-types that already show the proper icon.

When I consider that this process takes about 8 clicks and 20 seconds in Windows, I feel like a moron for not figuring it out in OS X. If you can help, I sure hope you will. Thanks in advance!
posted by chudmonkey to Computers & Internet (12 answers total) 1 user marked this as a favorite
I'm not totally sure I am understanding the question, but I suspect what you need to do is this;

1. Select the icon
2. Hit command-I for Get Info
3. Go down and change the application "Open With" dialogue to the correct program
4. Then select the button for "Use this application to open all documents like this." That ought to change all the icons.
posted by astruc at 1:07 AM on July 26, 2007

Thanks for responding, astruc, but it doesn't work no matter how much it ought to. Changing the application associated with the file-type is not the problem I'm having.
posted by chudmonkey at 1:14 AM on July 26, 2007

Have you tried a repair all disk permissions and a reboot? Sounds like your mac has misplaced a graphical permission somewhere.
posted by Happy Dave at 1:25 AM on July 26, 2007

There are two things I'd try:

1. Get info on the file, select its icon, and press "delete". This will delete any file-specific icon and reset it to the default icon for files of its type.

2. Open Terminal and enter the command "chmod a-x /path/to/file". It may be that the file is marked as executable, so OS X thinks it's a command-line program, and displays the "blank terminal" icon instead of a document icon. "chmod a-x" means "change modification permissions (chmod) so that all (a) users can no longer (the minus sign) execute (x) this file".

If neither of these things work, and ALL files of .rmvb don't have this icon, it may be that MPlayer hasn't specified an icon for this file type.
posted by panic at 1:34 AM on July 26, 2007

There is a free drag and drop icon changing application called Micon.
1. Select all the .rmvb files drag and drop them onto to the Micon application icon. Micon will launch with a stack of files on the icon target(s) pane.
2. Find the new icon and drag and drop it onto the icon source pane.
3. Click on the set button and the change should take effect on all the icons.
4. Quit the Micon application.
Unfortunately, you will have to repeat this process on new .rmvb files.
posted by plokent at 1:47 AM on July 26, 2007

Everything you did is correct. The problem isn't a missing icon file. It's that MPlayer doesn't "know" this file particular association.

Here's what you do.
1. Select the MPlayer application icon.
2. Right-click and select "Show Package Contents"
3. Inside Contents, open the info.plist file in the text editor of your choice
4. Find the list of <string>filetype</string> The first short set is audio formats - wma, mp3, etc. The next longer one is video formats.
5. Add <string>rmvb</string> on a new line. You can get an audio icon or a movie icon depending on the list.
6. Save the plist.
7. Restart the finder.

Warning: Do not do this while MPlayer is running. If this sounds scary or intimidating, make a backup of the plist first so you can undo mistakes easily.
posted by O9scar at 5:40 AM on July 26, 2007

O9scar - I figured that the problem was with MPlayer itself not "knowing" the file-type. This advice is awesome, and I can imagine I'll use this knowledge in the future as well.

However, it didn't work in this case. I noticed in the info.plist file that each extension had two lines, in lower-case and capital letters, so I added rmvb and RMVB, per your suggestion. I relaunched Finder and restarted the system, but the icon for .rmvb files hasn't changed.

Do you think removing the original application associated with these files (RealPlayer - blecch) would help?
posted by chudmonkey at 12:14 PM on July 26, 2007

I'm not sure - sometimes these things are finicky. I'd try the equivalent of smacking a TV on its side - changing the default app for rmvb to back to RealPlayer and then again to MPlayer (fingers crossed).
posted by O9scar at 12:54 PM on July 26, 2007

Tried that... Teasingly, when I changed the default application from RealPlayer to MPlayer, the icon of the single .rmvb file I had selected changed to the proper MPlayer icon, but as soon as I hit the "change all" button, it and all the other .rmvb files took on the "terminal icon" again.

Restart had no effect, nor repairing disk permissions.

This is mind-boggling.
posted by chudmonkey at 1:19 PM on July 26, 2007

Could it be the old-school type/creator codes that are messing you up? In the bad old days, the type/creator codes were looked up in a database that would give you the right icon. That database was built by scanning applications for their document types. I confess that I'm not clear how this operates with OSX's use of suffixes but it might help to get the file's type and creator codes.
posted by chairface at 2:25 PM on July 26, 2007

The only other suggestion I can think of is rebuilding the launch services database - the place the Finder keeps file association info.

You can also reset the LaunchServices Database with Onyx if you don't want to muck around with the terminal.

I also found this hint that suggests you can tweak the database for a changed app without rebuilding the whole thing.

Again, I'm not 100% certain, but it's my best guess.
posted by O9scar at 8:10 PM on July 26, 2007

O9scar, I used Onyx to re-build the database and now my .rmvb icon problem is solved. Of course, as a consequence of re-building the database, I have to reset a bunch of my file-type's default applications - but I don't mind at all, since the worst is behind me.

I really appreciate you keeping an eye on this thread and coming back 3 times with suggestions. You're one of the good ones, dude.
posted by chudmonkey at 12:20 AM on July 27, 2007

« Older What does a credit approval today say about my...   |   WTF is my cat doing? Newer »
This thread is closed to new comments.