vote up 4 vote down star
2

I know there is a system preferences pane to manually modify the file associations in Mac OS X Leopard. However, I'm curious where does Leopard actually store these information?

UPDATE: as I said, I'm not interested in methods to change them. I want to know the configuration file or database (like registry in Windows) where those mappings are stored.

flag

25% accept rate
some please re-tag this with "mac" and "osx" (those tags are more widely used) – Thilo Aug 11 at 0:57
There was a discussion on meta on this but I couldn't conclude which tag wins. – Mehrdad Aug 11 at 10:22
I suppose the best way to decide the winner is to look at the numbers. Popularity beats taxonomy on social network sites. – Thilo Aug 13 at 1:13
See also: superuser.com/questions/17761/… (slightly different, but may also be helpful). – Jonathan Leffler Sep 16 at 4:58

3 Answers

vote up 10 vote down check

OS X uses a "defaults" system -- here's a nice article with lots of examples. The files are stored under ~/Library/Preferences, but it's best to manipulate with the "defaults" command rather than editing the plists directly.

File associations are stored under the com.apple.LaunchServices domain. From the link above, you can see the list with this command:

defaults read com.apple.LaunchServices | grep -v LSBundleLocator

Far more information about Launch Services specifically, can be found in Apple's Launch Services Programming Guide

link|flag
vote up 2 vote down

Easy peasy! Its just that it isn't in the most obvious place:

  • Right click on the file you want to change the association for and select "Get Info" (or just select and hit Command+I.
  • Go down to "Opens With" (you may need to click the arrow next to it to expand it) and select another program from the drop down box.
  • Click the "Change All..." button to change this file association for all files of the same extension on your system.

You could also go out and install RCDefaultApp prefpane to modify all file associations in one place.

link|flag
Did you read the question? It was about where OS X stores the information, not how to change the associations. – Jonik Aug 11 at 10:28
Yeah, but knowing how to change them also helps. Like it helped for me... @joshhunt: maybe if you made it explicit that the Get Info stuff is in the Finder with the file selected. (Just had to undo one application grabbing another's files - this helped.) – Jonathan Leffler Sep 17 at 19:16
vote up 1 vote down

~/Library/Preferences/com.apple.LaunchServices.plist

link|flag

Your Answer

Get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.