SUMMARY The mime-apps specification at https://specifications.freedesktop.org/mime-apps-spec/latest/ar01s04.html states that all mimeapps.list files should be scanned for a valid [Default Applications] entry before falling back to [Added Associations]. In KDE instead, if you have a file at ~/.config/mimeapps.list with an invalid default application it will fall back the same file's [Added Associations] before looking at other files' [Default Applications]. The issue manifests when the distro changes the desktop file name of a browser you previously selected as default browser in systemsettings (which arguably shouldn't happen, but...) STEPS TO REPRODUCE 1. Install a non-distro-default browser -- I'm going to use Chromium as an example 2. Backup ~/.config/mimeapps.list, if this is not a test machine 3. Create ~/.config/mimeapps.list with contents: ``` [Added Associations] x-scheme-handler/http=bad-desktop-file.desktop;chromium-browser.desktop; x-scheme-handler/https=bad-desktop-file.desktop;chromium-browser.desktop; [Default Applications] x-scheme-handler/http=bad-desktop-file.desktop; x-scheme-handler/https=bad-desktop-file.desktop; ``` 4. kbuildsycoca6 5. xdg-open http://foo OBSERVED RESULT https://foo opens in Chromium EXPECTED RESULT https://foo opens in the distro's default browser, as specified in some other XDG directory such as /usr/share/mimeapps.list SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: Fedora KDE Rawhide (available in About System) KDE Plasma Version: 6.0.2 KDE Frameworks Version: 6.0.0 Qt Version: 6.6.2 ADDITIONAL INFORMATION GNOME's implementation seems conformant
Harald and David, I recall that you two are ~~unlucky~~ fortunate enough to know something about the implementation here.