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.

6 Answers 6


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:


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

  • If anyone still strugling check this feed it says remove this line image/pdf=display-im6.desktop from ~/.config/mimeapps.list Nov 19, 2022 at 9:47

Try editing /etc/gnome/defaults.list

Search for application/pdf and amend your viewer there.


I had the same problem and found the following solution:

$ nano ~/.config/mimeapps.list

and set image/pdf to evince.desktop


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
  • it is suggested not to remove imagemagick as it has dependencies for other apps or functions Jan 27, 2021 at 13:26

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.


"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, 2018 at 2:46
  • when you look at the properties and choose "Set as default" image majick refusess to change from defjault even after I tried to purge image majick with apt
    – Willoczy
    Feb 17 at 16:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .