4

History: I had problems with mime associations under Firefox. Firefox opened downloaded files with wrong programs. I deleted ~/.local/share/applications/mimeapps.list and now it works.

Now I noticed that the problem is transferred to Calibre and Chromium. For example, cbr files are opened with file-roller instead of evince, and directories are opened with Firefox!

Mime associations with the file browser (PCManFM) worked before and works now without problems. I'm under Lubuntu 13.10.

0

I had this problem with Calibre, and found a solution in this article by Jacek Bzdak. It's necessary to change the mimetype association for xdg-utils, which is the tool Calibre uses to open files:

  1. Get the mimetype of your problematic file, which can be done with one of xdg-utils commands, xdg-mime: xdg-mime query filetype <filename>

  2. Find the .desktop file for the application you want to use. In *buntu they should be in /usr/share/applications.

  3. Assign this file as a default: xdg-mime default myapp.desktop application/x-whatever (it doesn't need a absolute/relative path, just a .desktop filename)

(Unlikely to help you, two years later, but it was one of the top google results for me, so maybe someone else will find this useful.)

EDIT: fixed missing default keyword, thanks @Marco Sulla.

  • It does not work. mime is already associated well, since I can opend the file with the right application from the file browser. PS: it's xdg-mime default myapp.desktop application/x-whatever – Marco Sulla May 15 '16 at 21:11
  • @MarcoSulla Have you tried opening the offending file with "xdg-open" and seeing what app it's handled by? The thing is, the mime association doesn't match with the rest of the system (at least on Xubuntu/Kubuntu where I tried it). I had the file open in my preferred app from a file browser, yet in the wrong one from calibre. (Oh, also, thanks for the correction, fixed.) – corvidism May 16 '16 at 23:00
  • It's opened by mplayer. It's wrong since I use vlc, but at least it's not gedit – Marco Sulla May 17 '16 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.