You are not logged in.
Hello!
After installing Chromium I noticed that its chromium.desktop file assigns much more mime-types than needed:
/usr/share/applications/chromium.desktop
...
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;
...It replaces the default associations for PDF, PNG, JPEG and GIF. Not what a user expects or wants.
The defaults of Epiphany
MimeType=text/html;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;multipart/related;application/x-mimearchive;message/rfc822;application/x-xpinstall;and Firefox
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-xpinstall;application/pdf;application/json;seem to fit and are less invasive.
If I'm correct a pacman-hook updates the file /etc/xdg/mimeapps.list according to the desktop file? The content of the desktop file seem to be the default from upstream but questionable. Should I ask the maintainer to change that?
Last edited by hoschi (2023-03-01 16:18:37)
Offline
It is capable of handling those mime-types, so it is appropriate to list them. That line does not at all imply that it should be the default or preferred application for all those types. It's up to you to configure you're preferences, chromium is just presenting itself as an option.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thank you. You're right.
I assumed the MimeTypes listed in the chromium.desktop override the existing defaults. But looking at the result of the pacman-hook in "/usr/share/applications/mimeinfo.cache":
...
image/jpeg=chromium.desktop;gimp.desktop;org.gnome.eog.desktop;
...
image/png=chromium.desktop;gimp.desktop;org.gnome.eog.desktop;
...
application/pdf=chromium.desktop;firefox.desktop;firefoxdeveloperedition.desktop;gimp.desktop;org.gnome.Evince.desktop;
...I just seems to be the first in lexicographic order? And therefore becomes the default handler. Removing the associations wouldn't help, the next candidates are GIMP (JPEG, PNG) or Firefox (PDF). Shipping a preset with the UI (GNOME) is also problematic. Best workaround seems the user does set all associations for Mime-Types in advance (unlikely) or later (likely).
Mime-Type associations seem to be a notorious quest ![]()
Last edited by hoschi (2023-03-01 16:26:28)
Offline