Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Me default djvu viewer is okular:

  • xdg-mime:

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

    [Added Associations]
    image/vnd.djvu=okular.desktop;evince.desktop;
    
  • When I click on a djvu -- okular opens it.

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

    image/vnd.djvu=okular.desktop
    

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

1 Answer 1

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

 
discard

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.