Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can one add a new MIME type in OS X?

share|improve this question
It's not clear what you're talking about. Add a new MIME type so that what happens exactly? – David Schwartz May 8 '12 at 2:12
So that it's handled by some application, see my answer @DavidSchwartz – slhck May 8 '12 at 6:59

The easiest would be to download and install RCDefaultApp. Go to System Preferences » Default Apps, then the MIME Types tab.

Enter your new MIME type in the text box below, press the + button, and select your handler.

Via command line, you need to edit the ~/Library/Preferences/ preference list. In its array of LSHandlers, you need to insert a Dictionary containing your new MIME type as:

  • LSHandlerContentTag – the MIME type
  • LSHandlerContentTagClass, which is public.mime-type
  • LSHandlerRoleAll, which specifies the Bundle ID of the application that handles it, e.g. org.videolan.vlc. You find out the bundle ID by inspecting the .app folder and the Info.plist preference list therein.

share|improve this answer
Is there a way to do the same from the command line? Possibly by editing mime.types? – Jam May 8 '12 at 13:38
See my updated answer. Are you talking about apache2/mime.types? Not sure if you're supposed to edit that. Can you elaborate a bit why you need to edit it? What's your context? Without context, it's hard to help you. – slhck May 8 '12 at 14:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .