Mac Os X Default Program For Extension

Back in the pre-Mac OS X and macOS days, Apple’s System 9 and earlier relied on hidden metadata to associate files with apps. File extensions, those bits of text that follow a period at the end. The rsrc file extension is used by Mac OS operating system for its resource files. Also used by previous editions of Mac operating system. These files contains various data used for themes, such as icons, images ands other custom data. Changing the default applications that opens when opening a file in Mac OS X is a definite must know, and can save you time as well as a headache. Maybe you’ve downloaded a new app that you want to set as the default, or opening a picture could default to an app that takes a long time to load, such as Photoshop.

In OS X, all file types have a default application that opens when you double click on them. If you double click on a PDF file or a PNG file, chances are that your Mac will open it in Preview, Apple’s default PDF and image file app. If you’ve given an app like Adobe Reader, for example, permission to set itself as the default PDF app, then all PDFs will open in Reader.

Over time, you may have set apps as default that you no longer want to open your files. Conversely, you might want all JPG files to open in Preview, except one specific JPG file, which you’d like to open in Photoshop. Here’s how to make both of these situations work for you.

First up, to change the default app across all documents of a give file type, simply click on a file of that type, say, a PDF file. Then right-click on that file (or Control-click, if you like) and choose Get Info from the resulting contextual menu. Look toward the bottom of the Information window that will open up, and find the section that says “Open With:”

Click on the little triangle next to this section, or, if it’s already open, choose the app you’d like to set as that file type’s default from the pop up menu. Then, click on the Change All… button below that area, and from then on, all files of that type will attempt to open in the app you chose when you double click.

Now, if you’d like to open a specific file in a specific app, overriding the default app, simply right-click on the file, and then hit the Option key on your keyboard. The Open With contextual menu item will then change to “Always Open With,” and allow you to choose which Application you’d like to use to open this file with, all the time, no matter what the default app is set to.

Via: OS X Daily

Active5 years, 5 months ago

I want to open files without file name extension, including .dotsystemfiles (e.g. .htaccess or .vimrc) with a different editor than TextEdit. Doing the regular Change All... in the Get Info panel won't do the trick as it gives the following error:

Der Hochstapler
69.9k51 gold badges239 silver badges290 bronze badges
jasonkuhrtjasonkuhrt

2 Answers

You need to change the editor for the text/plain mime type or public.plain-text UTI. The regular Get Info dialog changes the association for the file name extension, which these files don't have.

Get RCDefaultApp and install it.

Open System Preferences » Default Apps » Apps. Select your desired default editor, and look for either of the above in the application's list of supported types.

Select the entry, and click Set as Default. You're done. Both opening from Finder and the command-line open will open your new default editor.

This also changes all .txt files and the like. I don't think this can be prevented, since OS X thinks both these and extension-less files are public.plain-text/text/plain.

To do this without RCDefaultApp, edit Edit ~/Library/Preferences/com.apple.LaunchServices.plist.

Add an entry under LSHandlers, containing the UTI (key LSHandlerContentType, e.g. public.plain-text) and application bundle identifier (LSHandlerRoleAll, e.g. com.macromates.textmate).

It looks like this in Property List Editor:

Daniel BeckDaniel Beck
95.4k12 gold badges241 silver badges292 bronze badges

You can also run plutil -convert xml1 ~/Library/Preferences/com.apple.LaunchServices.plist and add something like this:

You can apply changes by restarting or by rebuilding the Launch Services database. Logging out and back in isn't enough.

Or add this to a duti configuration file:

public.plain-text also includes files with a .txt or .text extension. I don't know any way to change the default application for files with arbitrary extensions.

public.unix-exexutable includes executable scripts without a filename extension. If you try to change the default application for them from Finder, there is an error like this:

The operation can’t be completed.

An unexpected error occurred (error code -50).

Community
LriMac Os X Default Program For ExtensionLri

Make Yahoo Mail Default Program

32.6k5 gold badges95 silver badges135 bronze badges

Yahoo Mail Default Program

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