Me default djvu viewer is okular:

  • xdg-mime:

    $ xdg-mime query default image/vnd.djvu
  • in $HOME/.local/share/applications/mimeapps.list:

    [Added Associations]
  • When I click on a djvu -- okular opens it.

  • in /etc/gnome/defaults.list (/usr/share/applications/defaults.list links to this file):


However firefox thinks my default app for djvus is evince:

enter image description here

How do I set okular as a default viewer in firefox? [this doesn't mean I want "Use okular" to be a default action -- I just want it to be a default viewer]


Oh, I solved it:

xdg-mime default okular.desktop image/vnd.djvu

I wonder where this information is stored, since I already had it in my local mimeapps.list.

So in order to set a default program for sime filetype, one has to find it's mime type first -- which can be done by looking at /etc/gnome/defaults.list for example (and at /etc/mime.types in case no part of the mime-type is obvious, but You know the extension), and then find out wither there's a .desktop file for an application desired. Folders to be searched are:

  • /usr/share/applications and
  • $HOME/.local/share/applications

and then call xdg-mime.

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.