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

            Bug ID: 481473
           Summary: File associations do not de-duplicate applications
                    using X-KDE-AliasFor, resulting in some applications
                    being shown twice or more
    Classification: Applications
           Product: systemsettings
           Version: 5.93.0
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Keywords: qt6
          Severity: normal
          Priority: NOR
         Component: kcm_filetypes
          Assignee: plasma-b...@kde.org
          Reporter: adam.m.fontenot+...@gmail.com
                CC: fa...@kde.org
  Target Milestone: ---

SUMMARY

For reasons unknown to me, some KDE applications (e.g. Okular) have multiple
.desktop files for different filetypes. Okular, for example, has
`okularApplication_md.desktop` and `okularApplication_txt.desktop`, along with
many others.

This causes an issue in that all Markdown (.md) files are also plain text
(.txt) files. So if you try to open a Markdown file, you'll see Okular twice in
the list of possible applications.

Unless applications are supposed to *never* have multiple .desktop entries, KDE
needs to deduplicate these. It appears that the way KDE applications are
indicating the use of multiple .desktop entries is via the use of the
`X-KDE-AliasFor` line, e.g.

    X-KDE-AliasFor=org.kde.okular.desktop

Similarly, if a user assigns an application to a file type (e.g. I have Okular
set to open PDF files), and the application also inherits the file type via a
different .desktop file (e.g. okularApplication_pdf.desktop), the application
will be shown twice for the file.

KDE should most likely only add the first entry that appears in its search with
a specific alias to the applications that can open a given file type.

STEPS TO REPRODUCE
1. Make a simple Markdown (.md) file.
2. Right click the file and see what applications Dolphin gives you to open it.

OBSERVED RESULT

Okular appears in the list twice.

EXPECTED RESULT

Okular appears in the list once.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.93.0
KDE Frameworks Version: 5.249.0
Qt Version: 6.7.0
Kernel Version: 6.7.4-arch1-1 (64-bit)
Graphics Platform: Wayland

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

Reply via email to