The problem described below appears sometimes when a folder is opened from context menu with an option similar to "Open with" - "Other application"
What happens is that the program selected in this way (and which after that is already available under "Open with" context menu for selected folder) takes over the file manager function in different other applications, like Firefox, Chromium, uGet, Calibre, etc, which have options similar to 'Open containing folder'.
Not all programs selected in this way trigger the problem (from what I've seen, namely
qmmp, Decibel audio player, Easytag, Atom text editor are some of those). - Also, not all applications mentioned as affected by the problem (Firefox, etc) are to be affected at the same time. In the past I have often seen this in Firefox, but last time Firefox was not affected but uGet and Calibre were.)
This problem is frequently reported on Linux sites like this, for example:
What happens is that the program in question becomes the first to appear in
This doesn't cause automatically the problem reported in the linked questions, I have a system (elementaryOS Loki) where the file manager is listed there last without any problems, but in another Linux (Manjaro) the file manager has to be listed first, like (for Nemo)
But how to open a folder in a such program without this kind of conflicts with the file manager?
I'm creating this question in order to provide the answer.
As indicated in a comment by don_crissti under my initial answer: if the problem is triggered automatically after installing a certain program (in my case Decibel), it will re-appear even after correcting the file
/usr/share/applications/mimeinfo.cache when a new installation or an update by the command
update-desktop-database. (I will add te suggested solution to the answer too.)