4 ms·
Is the OP's install missing a bunch of MIME entries or something? I can't reproduce the examples given for xdg-mime on Fedora 34, e.g. $ xdg-mime query filet
by TD-Linux 5y ago
Is the OP's install missing a bunch of MIME entries or something? I can't reproduce the examples given for xdg-mime on Fedora 34, e.g.
$ xdg-mime query filetype file.docx
application/vnd.openxmlformats-officedocument.wordprocessingml.document
$ xdg-mime query filetype file.xls
application/vnd.ms-excel
- vermaden 5y agoFedora 34 is as bleeding edge desktop as it can be. Maybe you have more recent xdg-utils version? I run 1.1.3 here.
- TD-Linux 5y agoI also have 1.1.3. Maybe what's missing is the libreoffice package? It seems like all these types are provided by /usr/share/mime/packages/libreoffice.xml on my system (which is read by update-mime-types). Arguably this is a common enough format that you shouldn't really need libreoffice installed to have it, though I would think any other office program would have it. I think /etc/mime.types serves as the ultimate fallback, though it doesn't have entries for libreoffice file extensions on my system.
- teddyfrozevelt 5y agoCan't reproduce any of these on Arch either, mine is definitely checking the contents of the file as it saw an empty file titled "file.pdf" as "text/plain" and a .doc as "application/msword".