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

            Bug ID: 427469
           Summary: mimeapps.list is not respected when called by xdg-open
           Product: frameworks-kservice
           Version: 5.74.0
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: fa...@kde.org
          Reporter: spleefe...@gmail.com
                CC: kdelibs-b...@kde.org
  Target Milestone: ---

Created attachment 132225
  --> https://bugs.kde.org/attachment.cgi?id=132225&action=edit
~/.config/mimeapps.list

SUMMARY
If I open a .7z archive in an app like Chromium, it will consult xdg-open,
which will check that the environment is KDE, which will result it in taking a
kde-open5 path, which will use ktraderclient5, which will ignore entries that
have a corresponding .desktop entry with NotShowIn=KDE if current environment
is KDE;

I think the correct behavior here would be mimeapps.list overriding the
.desktop NotShowIn rule.

STEPS TO REPRODUCE
1. Set file-roller to open 7z(application/x-7z-compressed) files in
mimeapps.list
2. Set NotShowIn=KDE; in file-roller's .desktop
entry(/usr/share/applications/org.gnome.FileRoller.desktop), which is already
the default on Arch
3. Test what .7z is going to be opened with, either via Chromium, or this handy
shell command:
  % XDG_CURRENT_DESKTOP="KDE" /usr/bin/ktraderclient5 --mimetype
application/x-7z-compressed | grep EntryPath | head -n1 
DesktopEntryPath : '/usr/share/applications/kindlecomicconverter.desktop'

  % XDG_CURRENT_DESKTOP="notKDE" /usr/bin/ktraderclient5 --mimetype
application/x-7z-compressed | grep EntryPath | head -n1
DesktopEntryPath : '/usr/share/applications/org.gnome.FileRoller.desktop'

OBSERVED RESULT
Downloaded .7z archives opened via Chromium are opened by an app that's not the
system default

EXPECTED RESULT
Downloaded .7z archives opened via Chromium are opened in file-roller, which is
defined as the default app in mimeapps.list


SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1
Kernel Version: 5.8.13-arch1-1
OS Type: 64-bit
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 31.4 GiB of RAM
Graphics Processor: GeForce GTX 1080 Ti/PCIe/SSE2

ADDITIONAL INFORMATION
https://bugs.kde.org/show_bug.cgi?id=416950

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

Reply via email to