I’m running Kubuntu 26.04, KDE Plasma 6.6 and when I open a PDF from Thunderbird it always shows the system file handler dialog asking which application to use. I check “Remember my choice” / “Always open with” and select my PDF viewer Okular, but the choice is not saved, the dialog appears again the next time.
What I’ve already tried
- Set application/pdf in System Settings/Applications/File Types and moved my preferred app to the top.
- Restarted KDE and Thunderbird.
How to make KDE/Thunderbird reliably remember the “Always open with” choice for Okular?
Thanks, I can paste the diagnostic outputs if needed.
~/.thunderbird/ has profile folders, and you should find your handlers.json file - try renaming that to handlers.json-borked and see if it clears the problem.
Restarting thunderbird, check/set it again.
I guess that you have Thunderbird installed as a Flatpak. In this case, it is not able to see your installed applications and therefore uses the system open with functionality that thinks that Thunderbird wants the user to choose and therefore does not automatically choose the default.
I think this has to be fixed in Thunderbird so that it uses xdg-open instead of the system’s open with dialog.
The handlers.json suggestion is probably the most relevant thing to check first.
Thunderbird stores attachment handler associations there, and there are multiple Mozilla reports where incorrect or stale entries in handlers.json caused “Always open with” or attachment associations to behave incorrectly.
Examples:
The Flatpak theory is possible, but at the moment it’s still an assumption since the original post doesn’t mention how Thunderbird was installed.
Since the system PDF association is already configured and KDE settings were tested, I’d be more inclined to investigate Thunderbird’s handler state before assuming a Plasma or xdg-open problem.
Thanks all for reply
I’ll test tomorow
I use Thunderbird in snap release, because Kubuntu.
Ah, the ancient Stable desktop - I guess that means the repository version is ancient too, right?
ppa:mozillateam/ppa is the official launchpad repository maintained by the Ubuntu Mozilla Team, giving traditional .deb packages and ensuring seamless integration.
So just remove the snap 
sudo snap remove --purge thunderbird
sudo add-apt-repository ppa:mozillateam/ppa
I thought this was just an Ubuntu thing… having never enabled snaps I can’t say too much, some applications in AUR are actually sourced from the Snap store, but installed as binary installations.
It might be worth searching how to prevent auto-installation of snaps instead of debian files, or even changing the distribution.
I give up. Root cause from snap stuff. I prefer avoid add PPA and keep Thunderbird snap.
Me too.
In my LAST reply, 6 days ago, I told you :
Yet you come in and say you did what I told you and mark YOUR confirmation as the solution 
It’s a bit rude to ignore folks coming to help and marking your own responses as solutions, don’t you think?
It would also be interesting to know if you disabled SNAP - but I’m afraid if you come back with more issues I’m not sure I’ll bother.