Hi Yokota,
yokota <
yokot...@gmail.com> writes:
> System default application choice may vary on your applications
> installation order, or some other reasons.
> For example, .docx uses LibreOffice even I installs Calibre on my machine.
>
> You can choose your favorite applications as default application from
> GNOME file manager application: "Files"
> or other file managers.
>
> The help file of this application describes how to change default
> application choice (See blow).
> Don't forget to set "Always use for this file type" switch to keep your choice.
>
You're writing about the XDG case, which can be tested in a
desktop-agnostic way with "xdg-open".
Alexandre is writing about mailcap-defined MIME types. These can be
tested with "run-mailcap".
There's a nice article on this topic here:
https://unix.stackexchange.com/questions/472245/how-to-make-xdg-open-follow-mailcap-settings-in-debian
Alexandre Lymberopoulos <
lym...@gmail.com> writes:
> Reinstalling libreoffice again in aptitude didn't fixed anything. The
> workaournd I found here is to edit the mailcap (/etc/mailcap) file,
> commenting the lines linking that type of file to ebook-edit and
> ebook-viewer programs.
Have you tried /etc/mailcap.order? It might let you work around this
bug while you wait for it to be resolved, and IIRC it means your
customisation[s] won't be cloberred by a future update. I vaguely
remember that mimeview or mimeopen might be able to define per-user
mappings, but I'm not sure, because it's been so many years.
If I remember correctly mailcap.order is for admin use only, and not for
Debian packages, but it might be worth asking someone if this would be
alternative to patching upstream `resources/mime.types`.
> I insist on my suggestion to keep associtaion of files to its more
> obvious options programs and let specific users change it to their
> needs. In this concrete situation calibre, or any other software, should
> not claim the preference for opening .docx files over libreoffice.
To be fair, would you please install "antiword" and then try to open a
.doc (not a docx) from mutt? I'm not sure if antiword supports docx,
but the point is to use a well-established Debian package with
well-established mailcap behaviour.
Alternatively, install upstream `resources/mime.types` to
/usr/share/doc/calibre/examples, and let users opt-in. The XDG
mechanism should continue to work correctly in this case, it may break
the workflows of users who use minimal window managers. This solution
is the least work.
Regards,
Nicholas