You are not logged in.

#1 2019-06-03 20:15:14

chrisco23
Member
Registered: 2017-12-13
Posts: 116

[SOLVED] xdg-open ? docx in slack opens in calibre

Sorry in advance if this question is too general for the arch forum, but I really couldn't figure out whether to post here, or slack forums, or calibre forums, or where.

Just hit a weird situation where someone shared a docx on slack.  Clicking it in slack actually launched calibre, and automatically added it as a book.  Clicking a docx in dolphin file manager launches libreoffice, as desired.  Even clicking "Open containing folder" in slack correctly launches dolphin, which then correctly launches libreoffice for the docx.

I looked around at various mime files (.config/mimeapps.list, .local/share/applications/mimeinfo.cache, /usr/share/applications/mimeinfo.cache)

The only place I see calibre at all is in /usr/share/applications/mimeinfo.cache, but I see nothing in there that would cause a docx in slack to launch calibre.  Am I missing something?

$ grep calibre /usr/share/applications/mimeinfo.cache
application/epub+zip=calibre-gui.desktop;org.gnome.FileRoller.desktop;calibre-ebook-viewer.desktop;calibre-ebook-edit.desktop;
application/ereader=calibre-gui.desktop;calibre-ebook-viewer.desktop;
application/oebps-package+xml=calibre-gui.desktop;calibre-ebook-viewer.desktop;
application/vnd.ctc-posml=calibre-gui.desktop;calibre-ebook-viewer.desktop;
application/vnd.ms-word.document.macroenabled.12=calibre-gui.desktop;calibre-ebook-viewer.desktop;
application/vnd.openxmlformats-officedocument.wordprocessingml.document=calibre-gui.desktop;libreoffice-writer.desktop;calibre-ebook-viewer.desktop;calibre-ebook-edit.desktop;
application/x-cbc=calibre-gui.desktop;calibre-ebook-viewer.desktop;
application/x-cbr=calibre-gui.desktop;org.gnome.Evince.desktop;calibre-ebook-viewer.desktop;
application/x-cbz=calibre-gui.desktop;org.gnome.Evince.desktop;calibre-ebook-viewer.desktop;
application/x-mobi8-ebook=calibre-gui.desktop;calibre-ebook-viewer.desktop;calibre-ebook-edit.desktop;
application/x-mobipocket-ebook=calibre-gui.desktop;calibre-ebook-viewer.desktop;
application/x-mobipocket-subscription=calibre-gui.desktop;calibre-ebook-viewer.desktop;
application/x-sony-bbeb=calibre-gui.desktop;libreoffice-writer.desktop;calibre-ebook-viewer.desktop;calibre-lrfviewer.desktop;
application/xhtml+xml=vimb.desktop;firefox.desktop;calibre-ebook-edit.desktop;
image/vnd.djvu=calibre-gui.desktop;calibre-ebook-viewer.desktop;
text/html=vimb.desktop;google-chrome.desktop;firefox.desktop;pgadmin3.desktop;calibre-ebook-edit.desktop;chromium.desktop;

Last edited by chrisco23 (2019-06-10 18:25:43)

Offline

#2 2019-06-06 18:00:57

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [SOLVED] xdg-open ? docx in slack opens in calibre

application/vnd.openxmlformats-officedocument.wordprocessingml.document=calibre-gui.desktop;libreoffice-writer.desktop;calibre-ebook-viewer.desktop;calibre-ebook-edit.desktop;

This filetype maps to docx.

Offline

#3 2019-06-06 18:38:09

progandy
Member
Registered: 2012-05-17
Posts: 5,199

Re: [SOLVED] xdg-open ? docx in slack opens in calibre

You can use the xdg-mime tool to find out which mime type is associated with a docx file and change the application for a mimetype.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2019-06-10 18:26:17

chrisco23
Member
Registered: 2017-12-13
Posts: 116

Re: [SOLVED] xdg-open ? docx in slack opens in calibre

Thanks x33a, and progandy also for the tip!


Chris

Last edited by chrisco23 (2019-06-10 18:26:42)

Offline

Board footer

Powered by FluxBB