Package: calibre Version: 3.7.0+dfsg-2 Hi Norbert, I'm not sure if this is a calibre or mime-support bug. The calibre package ships a /usr/share/applications/calibre-ebook-viewer.desktop file that declares itself as a mime handler for application/pdf. Due to bug #877774 being present in this version of the package (which is the version that wound up being shipped in Ubuntu 17.10), it doesn't work at all as a mailcap handler; but even with that bug fixed, it is taking precedence over evince, which is the default pdf handler that I have installed and the one that I expect to see used. I don't know if this is just a matter of 'calibre-ebook-viewer' sorting alphabetically before 'evince', or what; but having calibre installed in order to read ebooks should not make it the default mailcap handler for pdfs. I suppose this issue would possibly also be resolved if bug #802767 were fixed. Thanks,
Hi Steve, I am quite sure that it is a mime-support. I have never understood how mime-support handles this. The defaults are somehow determined by the last package installed - my feeling. I have seen this with pdfs, html, most recently with .txt files that are now tried to be opened with wine+notepad (!!!). Without me touching anything in the configurations. I am tempted to through out all and everything of these mime-crap, or rewrite it from scratch. problem? Probably (trying to read your mind) by renaming the calibre-ebook-viewer to ebook-viewer, but then it still sorts before evince ;-) Sorry, no idea. I have decided do define each and every handler necessary in ~/.config/mimeapps.list BTW, also this is a huge fun to find out where one should configure it. Mine has: [Default Applications] application/pdf=evince.desktop; image/*=eom.desktop; text/plain=pluma.desktop; image/jpeg=eom.desktop video/mp4=smplayer.desktop text/html=firefox.desktop x-scheme-handler/http=firefox.desktop x-scheme-handler/https=firefox.desktop inode/directory=nemo.desktop Because even such stupid things as opening a folder does the wrong thing. Simpy put, MIME support is completely broken in Debian. Best Norbert
Dear Maintainer, Just to confirm that this "bug" remains in the current version and state that IMHO the mimetypes associated to calibre is "too greedy". For instance it doesn't make sense to me open a .docx file sent by e-mail in ebook-edit or ebook-viewer instead of libreofffice. Best, Alexandre
Hello, Alexandre. 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.
Hi, Yokota! I use XFCE here and despite choosing LibreOffice to open the docx files are opened by ebook-edit or ebokk-viewer when selecting them as attachments of an e-mail message in mutt. 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. 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. Best, Alexandre
Hi Yokota, yokota <yokota.hgml@gmail.com> writes: 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 <lymber@gmail.com> writes: 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`. 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