Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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]

share|improve this question
up vote 0 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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