8

Query shows evince is my default handler.

terminal showing evince as default

But, double clicking a pdf file opens ImageMagick. A pdf file's Properties shows ImageMagick as the default handler.

ImageMagick is the default handler

Why is this happening ?


After answering the why, also tell me how to solve it using the terminal. I am very fond of using terminal. I tried sudo xdg-mime default evince.desktop application/pdf, nothing changed, even after logging out and back in.

7

You might find this is a more clear answer that worked for me in Ubuntu 15.10:

  • edit the file ~/.config/mimeapps.list

  • just remove the lines that associate PDF to imagemagick in the file:

    image/pdf=display-im6.desktop
    image/pdf=display-im6.q16.desktop;display-im6.desktop;
    

The thread where I got this answer that worked for me is here: Unable to restore Envince as default pdf viewer

0

Try editing /etc/gnome/defaults.list

Search for application/pdf and amend your viewer there.

0

I had the same problem and found the following solution:

$ nano ~/.config/mimeapps.list

and set image/pdf to evince.desktop

0

I have no idea why but at one moment ImageMagic took over opening of PDFs. I have totally removed reference to pdf from ~/.config/mimeapps.list and pdfs started to open in xreader:

grep -v pdf  ~/.config/mimeapps.list > ~/.config/mimeapps.list1 && mv ~/.config/mimeapps.list1  ~/.config/mimeapps.list
0

I had the same problem and what worked fine for is to delete this file ~/.config/mimeapps.list and now I'm even able to change my defaults and it is getting changed unlike before.

0

"Why do PDF documents open with ImageMagick? After answering the why, also tell me how to solve it using the terminal."

Can't answer either question. However, for folks like myself who just want the fast path to fixing this, when you look at the properties (as shown in your question), simply choose the application you want to be used and "Set as default".

Et voila, it adds an entry to ~/.config/mimeapps.list and you are good to go.

  • This is a pretty old question and I'm not sure your solution is actually helpful... – NerdOfCode Mar 22 '18 at 2:46

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.