https://bugs.kde.org/show_bug.cgi?id=483898

            Bug ID: 483898
           Summary: Algorithm to select the default application for a
                    mime-type is non conformant
    Classification: Frameworks and Libraries
           Product: frameworks-kservice
           Version: 6.0.0
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kio-bugs-n...@kde.org
          Reporter: ales.ast...@gmail.com
                CC: kdelibs-b...@kde.org
  Target Milestone: ---

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

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to