The way Finder sets the default view is equally unintuitive
The way Finder sets the default view is equally unintuitive
1) Select any file.
2) Change the app in the "Open with" dropdown.
3) If you want it to apply to all files click the "Change all" button.
For example, I can imagine if there were instead two radio buttons in "Open With": "Always for this file", "Always for this extension". All in one place.
As a result it behaved like that:
- When you opened a file, it opened in the program that created it.
- When there were no such program, you could still open it in another program that claimed to understand these files. I don't remember how it was implemented, I think there was a dialog asking if one would like to use another program with some choice (probably the first one that fit).
This was rather handy with formats like "Encapsulated Postscript" in desktop publishing: this format supported both vector and raster images, but one normally used different applications to manipulate them.
This stayed for some time after the move to Mac OS X, but now I believe these things are gone or not used at all.
This is orthogonal to all that, though. It's about the UX to associate an app with a file type, regardless of how that file type is determined.
GNU/Linux doesn't automatically choose which program to use for anything (you can't ./file.png like you can in Windows). In my experience file managers tend to use file extensions to choose which application to use, and that application might then use libmagic and ignore the file extension. (e.g. giving a PNG file the .JPG extension will make the file manager think it's a JPEG, and therefore open it with an image viewer, but the image viewer program will use headers to recognise it as a PNG)