1

I am posting this here because it only happens in Linux. I think I have first seen this when I have started using Linux, almost 10 years now. I was already fond of Firefox and still am. I want to keep using Firefox as my default browser but this makes it difficult.

Downloaded files can be double-clicked/opened in the downloads list and they should open in the application set at system level or at least in one that makes sense. What about jpeg files downloaded with Firefox opening in Vivaldi browser? Or deb files opening in Ark archiver? 'Show in folder' opened Qmmp player or Audacious at some point.

I know I can (and did) edit/customize ~/.local/share/Applications/defaults.list, ~/.local/share/Applications/mimeapps.list, /.local/share/Applications/mimeinfo.cache and what not, but I'm tired of that.

In Firefox Settings, Applications, the problematic files have the "Always ask" option. Vivaldi appears as the "default", though. Why did that happen, and why only Firefox thinks Vivaldi is default for jpeg, while Chrome and other browsers use the expected image viewer? Why is it only happening in Firefox and in Linux?

What is the basic cause?

(At some point I blamed the various programs and their possible aggressive policy of imposing themselves or decoying as default programs. But how come only Firefox is tricked into falling for that?)

Can this problem be prevented?

A quick solution is to uninstall the false "default" program; less quickly, I can manually edit files with hundreds of lines. The problem usually involves a recently installed program. A "fix" could be to install a new one and have that as "default", however odd. Or remove and re-install the correct program! — But I want to prevent such "solutions".

I hope for something like a setting in about:config, saying "use system file associations", which once enabled would ignore the options in Settings/General/Applications or make them copy the ones at system level.

Not only a Firefox setting that can be altered by other programs is rather pointless, but the setting is not even respected; Vivaldi was also opening pdf files; removing Vivaldi and selecting "System default application", a pdf file is opened in ...Chrome! Changing that to —well!— Okular, the same happens...


EDIT:

This question is about how to avoid a situation where Firefox opens its downloaded files in unexpected programs. On what files/settings can be edited to fix that problem: see this question.

2
  • You should be able to set the correct default application in the Firefox "General" settings under the "Applications" section (Which you have already stated you have accessed), this seems like a much easier solution than uninstalling and reinstalling every program that is causing issues. Jan 4, 2022 at 14:44
  • @dcom-launch - That is false. As said here the Firefox Settings-General-Applications options are NOT about opening in a certain program an already downloaded file, they are about download actions: a choice between saving, opening in Firefox, in another application or asking what to do in relation to a file not yet downloaded. As for what app opens the files in FF downloads list, see linked question in edit.
    – cipricus
    Jan 6, 2022 at 10:17

1 Answer 1

1

According to this question , on KDE the default application associations are stored in the following files and searched for in the following order:

.config/kde-mimeapps.list
.config/mimeapps.list
/etc/xdg/kde-mimeapps.list
/etc/xdg/mimeapps.list
/usr/share/applications/mimeapps.list

Because this is where the default application information comes from, if you can prevent these files from being modified, then no file association should be able to change.

You can accomplish this task by using chattr +i /path/to/file . This sets the immutable attribute on the file, which means it cannot be edited until that attribute it removed. This should stop any program from overwriting the mimeapps.list files. However, you will not be able to change your default applications unless you remove the immutable attribute.

You must log in to answer this question.

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