Thunderbird keeps passing PDFs to Okular which is not the default application

I have changed my default application for PDF files to Xodo but Thunderbird still passes PDFs to Okular, even though it is set up to ‘Use System Handler’. Default Application and File Associations in System Settings correctly point to Xodo, as does Properties for PDF files. Opening PDFs in Dolphin etc correctly open in Xodo.

I’ve look around a lot, and restarted the system several times over the last few days just in case the wrong association is cached somewhere. Thunderbird insists on calling Okular. Is Okular defined as default anywhere else?

Operating System: Debian GNU/Linux 13
KDE Plasma Version: 6.3.6
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.2
Kernel Version: 6.12.48+deb13-amd64 (64-bit)
Graphics Platform: Wayland

Thunderbird 140.4.0esr

did you try simply deleting your ~/.cache directory and rebooting?

i don’t use thunderbird, but it should follow what you have defined under settings > file associations for .pdf

what i find weird, is that even tho i have thunderbird installed, when i go to my file associations, there is a long list of installed applications already populated there and thunderbird is not listed.

i can add it, of course, but since it came preinstalled on my kubuntu 24.04, i would expect it to already be listed.

makes me think there is something lacking in the thunderbird config for both our Thunderbird 140.4.0esr installations.

I have deleted the cache and have been looking around. Still no joy. TB still opens Okular and I can’t even imagine why. Everything else sees Xodo as my default appication. It’s not the end of the world, but not knowing what is happening is so annoying I am considering reinstalling TB and Xodo.

In TB select the pdf handler having “(default)” at its end, then it will automatically follow your changes in Plasma:

Done that and tried all options there:

xodopdfreader is a script running the Xodo application, exactly as the Plasma launcher runs it.

I am beginning to think it’s TB as flatpak messing up paths, failing to access xodopdfreader as the default application for PDFs, and falling back to Okular for some reason, but then other filetypes (like docx, xlsx etc) currently being handled by the System Handler as above, shouldn’t work either, but LibreOffice is launched as normal.

Also, to test my fall-back theory, I demoted Okular to the 3rd position on the Plasma list of applications handling PDFs.The idea was that if TB fails to run Xodo and then tries the next PDF viewer, it won’t try to open Okular which will be further down the list of available applications. But it does open Okular again. I am wondering what will happen if I uninstall Okular.

I use Arch/Manjaro so I don’t need flatpaks and have no experience with them.

Try installing another PDF viewer like mupdf, if it works with it then your script is the one failing, if it doesn’t work then maybe the cause is flatpak.

I had tried various PDF handling applications (PDF Arranger, Firefox, PDF4QT etc) as plasma defaults for PDF, and they were all ignored by TB in favour of Okular. I followed your advice and installed a simple non-flatpak PDF viewer, so I tried qpdfview. Strangely, mupdf is not on the debian repository.

With qpdfview and now all other PDF applications I set as system defaults TB acts very strangely. It won’t open the external viewer but it started saving many zero-size files with filenames like XJ1jl_xo.html.part in ~/Downloads. That’s over 5200 files so far. The only way to stop it is to exit TB and then TB relaunches immediately as if nothing happened. I think there a bug in the flatpak and I will just get TB to use its internal viewer for PDFs which fortunately still works. That’s unless I get another idea tomorrow. Thanks anyway.