Unable to change default viewer for pdf docs

UpNorth

Active Member
Joined
Dec 27, 2023
Messages
107
Reaction score
94
Credits
881
Whenever I open a pdf doc, the Image Magick window comes up with the wizard guy. After that, nothing happens, so I'm not even sure what this application is good for. I can right click and choose to open the doc with Document Viewer, but I'm unable to make this my default application. When I go to Preferred Applications, it lets me make the change, but it doesn't keep the change.

In this screenshot I've made the change:

Screenshot from 2024-05-08 18-47-19.png


And here it is after I open it back up. Image Magick is back! What is the trick to this?

Screenshot from 2024-05-08 18-48-05.png




One more thing I tried: I went into the properties of a pdf document and then "Open With." I selected Document Viewer from the recommended applications, then set as default. It would not let me make the change. Still shows Image Magick as the default application.
 
Last edited:


Whenever I open a pdf doc, the Image Magick window comes up with the wizard guy
Which suggests that Image Magic is the default application set somewhere in DE settings, so instead of adjusting Image Magic settings (which your screenshot suggests) you should check settings in your DE for default applications.

It would help if you set out (or post screenshot of) DE settings in addition to Image Magic settings and Libre Office settings (that's 3 places to check).
Very likely there are multiple places of where default applications are set, and one setting might affect the other automatically reversing what you do.

I don't know the answer, this is only logic driven opinion.
 
Click on menu...type in default Preferred Applications will show...click on that

1715215264901.png

.Set Document Viewer as the preferred option there....(which I think you have already done...?)
If so, uninstall image magik......either in the Software Manager, or in Synaptic package Manager

Reboot...set the Preffered Applications again....and all should be ok now
 
That was it, Condobloke! I had to remove it from the synaptic package manager (wasn't showing in my software manager). Document Viewer is now showing as the default application.
 
In previous version of Linux Mint, the offered Image magick app came with some not so nice add on garbage......which inserted itself rather insidiously into other areas of the OS.
I encountered this behaviour and uninstalled it.

In short image magick had a nasty habit of seeing itself as the boss.

That was not about to happen on my pc....so I gave it the flick. I believe it was the Linux Mint prior to this one which is current now...so LM 21.2

I installed image magick again after talking to a colleague here and that behaviour (since the advent of LM21.3) has disappeared.

EDIT to Add: just spotted your post @UpNorth ......that was the result I expected.
 
There's also this, should you wish to keep Image Magick installed:


Change the Evince to match. I'd think it's libreoffice --writer but I'm not 100% certain.

(This is only if you wish to keep Image Magick installed - which is pretty potent tool when used in the terminal. If you don't care to keep it, you can safely ignore this.)
 
I had to remove it from the synaptic package manager

Tina do you mean that you removed ImageMagick completely using Synaptic?

If so, I hope you took a Timeshift snapshot first. You should always take a snapshot before removing a package that shipped installed with your distro, because what you are removing may act as a dependency for another app, and you may be unaware of that until you find that that app no longer works properly, if at all.

What I am about to say is somewhat dated, from my experience over the years - it may not apply so don't hit the panic button yet, but check that your printer works.

Running the command

Code:
apt-cache rdepends imagemagick

will spool off a large amount of output of packages that, while they may still work without ImageMagick, may have some of their functions adversely impacted by its removal.

These include, but are not limited to
  • cups-filters
  • libreoffice
  • inkscape
  • calibre
and numerous others.

It used to be the case that GIMP also relied on it, but I can't see signs of that at the moment.

Sing out if you have problems, may be just a storm in a teacup.

Chris
 
If so, I hope you took a Timeshift snapshot first. You should always take a snapshot before removing a package that shipped installed with your distro, because what you are removing may act as a dependency for another app, and you may be unaware of that until you find that that app no longer works properly, if at all.
This is exactly what I was thinking as I was reading this thread. There's a reason image magic is included with Mint (I think).
 
Reinstalled
 
You use Mint, correct?

Try this...

Open your file manager and find a .pdf file. Right click on it, and choose 'open with'.

Pick your application and then set it as the default before proceeding.

Open with_001.png


It should look like that. If I pick a different application that button becomes clickable. I'm not wanting to actually change my mime type associations, so I did not follow through with changing it.
 
You use Mint, correct?

Try this...

Open your file manager and find a .pdf file. Right click on it, and choose 'open with'.

Pick your application and then set it as the default before proceeding.

View attachment 19834

It should look like that. If I pick a different application that button becomes clickable. I'm not wanting to actually change my mime type associations, so I did not follow through with changing it.
Already tried this, didn't work. See comment #1.
 
@UpNorth So is the problem solved, or is it still there?
No, because I had to reinstall Image Magick. I see plenty of references to terminal fixes, but they are over my head.
 
Try this (one of the links I posted above):

1) Open your Home folder, then press ctrl + H (this shows hidden files/folders, which all begin with a " . ")
2) Open the hidden folder .config
3) Inside that open the file mimeapps.list with your simple text editor
4) Find the line that reads either a) image/pdf=display-im6.desktop -OR- b) image/pdf=display-im6.q16.desktop
and delete it. [Basically you're looking for a line that has both "pdf" and some form of "im" in it. The numbers may be different due to what version of image magick is on your system. Also, it may or may not have "image" next to pdf.] Save your changes and close the file. Now when you open a pdf it should open with Document Viewer.
 
Last edited:
That worked!!! Thank you! Document Viewer is now my default. For my own education, how did removing this line do the trick? Is that the command forcing Image Magick to be the default viewer?
 
Yep, it stuck.

Cups is still there. Had no problems printing. Reading the description of Image Magick in the software manager. Why does it say you can safely purge or remove it if it's essential for other programs to run?
 

Attachments

  • Screenshot from 2024-05-11 17-09-02.png
    Screenshot from 2024-05-11 17-09-02.png
    182 KB · Views: 20


Top