I associated pdf with Okular using mimeopen. Then I became curious where it had saved the configuration. My first guess was:


but it didn't contain the right entry. So I searched:

updatedb && locate mime | xargs egrep -e "okular" 2> /dev/null

and found nothing. So which file is used mimeopen to save associations?


I started digging, following a clue from cas's comment, and I found a file:


with the content:

[Desktop Entry]

Which strangely does not have a MimeType record

My guess: Since I use openbox, which doesn't set $DE environmental variable mimeopen had been forced to create a new .desktop file when I used it. Which is inconvenient.

I read it is possible to run openbox inside other desktop environments. I will give it a try.

  • possibly ~/.local/share/applications/mimeinfo.cache. BTW, see man pages for mimeopen,update-mime-database, and update-desktop-database. See also man pages for xdg-open and xdg-mime and related programs. The freedesktop.org people have been busy little beavers making things as confusing and complicated as possible. – cas Jul 3 '16 at 15:05
  • @cas Thanks you gave me a good direction to look – atevm Jul 3 '16 at 15:51
  • 1
    If you end up finding an answer, please write it up and post it, then Accept your own answer. If it's a good answer, i'll upvote it (ping me with @cas in a comment). – cas Jul 4 '16 at 7:07

I found the records:

mimeopen when no desktop environment is specified saves the records in:


  • This isn't the location that xdg-open uses though!! Symlink it to ~/.config/mimeapps.list for the win. – Tom Hale May 29 '17 at 6:56

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.