Choosing the default application does not stay as default after reboot

Solution 1:

I was doing it the wrong way like you try to for a long time and also have retreated to using RCDefaultApp in the past... but there's actually a way to do that natively which works.

Do the following:

1) right click your file 
2) choose "Get Info"
3) in the popup find the "Open with" strip (this is by default closed) and open it
4) from the drop down choose the program you want to open that type of file
5) click "Change all..."

And that's the correct way to do it

Solution 2:

There's a great preference pane RCDefaultApp. It should do what you want.

RCDefaultApp is a Mac OS X 10.2 or higher preference pane that allows a user to set the default application used for various URL schemes, file extensions, file types, MIME types, and Uniform Type Identifiers (or UTIs; MacOS 10.4 only). MacOS X uses the extension and file type settings to choose the application when opening a file in Finder, while Safari and other applications use the URL and MIME type settings at other times for content not related to a file (such as an unknown URL protocol, or a media stream).

Solution 3:

For anyone Googling for the same issue: as the venerable RCDefaultApp is now broken under 10.12 and later, there's a open-source equivalent SwiftDefaultApp

This Preference pane is chiefly intended to be a modern replacement for the amazing RCDefaultApp developed way back when by Carl Lindberg, which stopped working in 10.12 due to deprecation of ObjC Garbage collection

...

This Preference pane will let you view and change default application associations for basically any URI Scheme and/or filetype in macOS.

The UI is practically identical to RCDefaultApps, exception that "Extensions" (i.e. file extensions) is now rolled into "Uniform Type Identifiers", and it can be a little harder to find a specific extension. However, it works beautifully, both as a solution to the issue and as a replacement for RCDefaultApp.