I have the following problem, I registered a file extension to be opened by a Mac Application by clicking on the file in Finder and selecting to always use the target application to open the files.

So far it works, BUT it doesn't work with >open filename.ext as it will say:

No application knows how to open /path/filename.ext.

Clearly open works differently than Finder.

If possible I would prefer a command line solution.


If you selected Always Open With from a context menu, it only changes the default application for the selected items. If you change the default application from an information window, it normally also has an immediate effect on open.

If it wasn't that, com.apple.LaunchServices.plist can also be edited as XML:

plutil -convert xml1 ~/Library/Preferences/com.apple.LaunchServices.plist

Applying changes requires restarting. Logging out and back in isn't enough.

You could also try using duti or RCDefaultApp.


You can add them to the LaunchServices.plist file. To do that you open the .plist (I did it in XCode, if you've not got XCode installed there's standalone packages you can get), then you add a new tag entry with the application and extension you want. You'll have a fair few already in there that you can reference.

In theory what you set in Finder should be honoured by Terminal and open, but if it's not then it might be something in LaunchServices not working correctly.

  • Where is this file located on OS X 10.8? locate does not seem to find it.
    – sorin
    Jun 26 '13 at 13:47
  • It can be found in ~/Library/Preferences/com.apple.LaunchServices.plist, sorry I completely forgot to add that. Jun 26 '13 at 16:05

You must log in to answer this question.

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