3 ms·
> In Linux it's a mystery. I like my computer to behave in a predictable manner. You're not really talking about Linux. You're talking about mime types and xdg
by oehtXRwMkIs 6y ago
> In Linux it's a mystery. I like my computer to behave in a predictable manner.
You're not really talking about Linux. You're talking about mime types and xdg-open, the de-facto default way Linux desktop environments (not to be confused with distros) handle default applications. You mentioned double clicking so I'm going to assume you were talking about it in the context of a GUI DE opening files from a file manager or the desktop.
xdg-open is configurable and even completely replaceable. For example, I have it replaced with mimeo, which I have a couple hardset rules based on extensions. Any time I don't like its default behavior, I'll add 2 lines to the config file to specify what I want. I personally don't like configuring mime types and stuff itself. It's incredibly predictable because for example I just tell mimeo that anything that ends with pdf should be opened with zathura. I find that Linux tends to be way less mysterious since it's so open and transparent and configurable.
But a valid complaint to this response would be that defaults matter, and that you shouldn't have to tinker to get what you want.
So I think in that sense you're thinking of how KDE/GNOME handles this, which last I checked was extremely simple. You just right click a file and set the default application for opening its mimetype. Any future file of this mimetype will be opened by what you specified. And I think mimetypes are just better UX than raw extensions; it's a much better experience telling KDE to open all music files with your music app rather than specifying extensions. And various applications come with .desktop files that let you know what they can handle. So you get a nice list of relevant applications but you can still tell it to open it in whatever you want. Meanwhile in Windows the default behavior is to hide file extensions which I think is actually the worst of both worlds. Using file extensions to inform default applications while hiding them. I find that to be more mysterious.
> In Windows extensions have a meaning. In Linux, why even bother having extensions? In neither OS does the extension tell you about the content of the file. But on Windows the extension does tell you something useful about how the OS interacts with the file.
Again, "Linux" is not a monolith (yes the kernel is monolithic, but you know what I mean) that you can compare directly to Windows.
Windows basically has a mime types system but worse (less intelligent with clunkier UI and legacy defaults), and there's nothing you can do to change it.
On Linux it depends entirely on what you have setup.
For example, for a long time I just never had it set up.
There was nothing to "double-click" to begin with, and if I wanted to for example open an image file with my image viewer, I would just type out `imv bruh.png`.
What you're actually debating is xdg-open vs. whatever it's called in Windows.
I personally kind of agree with you so I don't use xdg-open.
But I'm still using Linux.
- Thorrez 6y ago>You're not really talking about Linux. You're talking about mime types and xdg-open, the de-facto default way Linux desktop environments (not to be confused with distros) handle default applications. Yes, but the github page this post is about is making that same mistake. > Meanwhile in Windows the default behavior is to hide file extensions which I think is actually the worst of both worlds. Oh yes, terrible, I can't believe I actually forgot about that. I've modified that on every Windows computer I use. Thanks for the info! I'll keep this in mind when I eventually switch to Linux like I've been meaning to for a while...
- oehtXRwMkIs 6y agoYeah, not blaming you at all for the common misconception. I'm just glad you got something out of my wall of text. If you ever make the switch, definitely check out the Arch Linux wiki even if you never use Arch: https://wiki.archlinux.org/index.php/Default_applications https://wiki.archlinux.org/index.php/Default_applications