Open probonopd opened 1 year ago
In this case, the .vbox
file wrongly has application/xml
as the MIME type. We should also have an EASY way for apps to say that they can-open
certain filename extensions.
As pointed out rightfully by @ammdias@masto.pt:
the same document may be opened by different applications, depending on what you want to do with it. I may want to open an image with the image viewer, if I want to display it, or with an image editor like Gimp or MyPaint. The same for a music file, should it have a Audacious or Audacity icon? A text config file may be used by an application at launch but I may want to edit it with Vim in a terminal or Gedit in GNOME. In those cases, which application icon should the documents have?
The one of the application that gets to open it when the file is double-clicked. For that exact reason!
The example above may be not the best one, as this may simply be the effect of the VirtualBox FreeBSD package lacking the icons (FreeBSD bug report), which, e.g., Fedora's RPMFusion virtualbox package and http://archive.ubuntu.com/ubuntu/pool/multiverse/v/virtualbox/virtualbox-qt_6.1.6-dfsg-1_amd64.deb make available in /usr/share/icons/hicolor/48x48/mimetypes
.
Thanks @konradmb@mastodon.social for pointing this out.
This is the upstream location of these icons: https://github.com/Virtualbox-OSE/Virtualbox/tree/main/src/VBox/Artwork/other
This is an absolutely dysfunctional atrocity.
Why is the document not showing clearly which application it will be opened with?
In my opinion, I am not interested in which data a file contains. I am interested in which application it is opened with. Different documents with the same data format may need to be opened with different applications (or even versions).
This has never worked in a "proper desktop" fashion on "Linux desktops". Possibly because the XDG standards don't even account for this.
Can it be that XDG doesn't even have the concept of document icons?
This is how it should be:
Yet where would the document icons be coming from?
The desktop file doesn't specify which documents it can open, nor what icon they should have:
Icon=VBox
also gives no clue about where that icon might be hiding... or which version of it should be used.Apparently XDG is not even allowing for the absolute bare essentials of a desktop to work properly, like having proper document icons.
Do we even have the document icon?
Nope! Only the application icon!
As a last resort, we can generate document icons from application icons on the fly by combining a generic document icon like this
with a small version of the application icon.
Extra credits for giving the document a color similar to the dominant color in the application icon.