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

            Bug ID: 467037
           Summary: Desktop files only look in `apps` for icons
    Classification: Frameworks and Libraries
           Product: frameworks-kio
           Version: 5.103.0
          Platform: Archlinux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kio-bugs-n...@kde.org
          Reporter: hunter...@gmail.com
                CC: kdelibs-b...@kde.org
  Target Milestone: ---

SUMMARY
- When fetching the icon for an application from a `.desktop` file that
specifies an icon using `Icon=`, if the specified icon is not present in the
`apps` directory of the icons path but is present in another directory of the
icons path, then the application has a blank icon in the taskbar. The Desktop
Entry Specification
(https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#recognized-keys)
states the algorithm from the Icon Theme Specification
(https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#icon_lookup)
should be used, which appears to search through all subdirectories of the icons
path for the requested icon.

STEPS TO REPRODUCE
1. Install an application that has a non-`apps` icon specified in its
`.desktop` file. For this, I am using Xfburn 0.7.0.
2. Notice that the `Icon=` line in `/usr/share/applications/xfburn.desktop` is
set to `stock_xfburn`.
3. Notice that, in `/usr/share/icons/hicolor/scalable`, there is no
`apps/stock_xfburn.svg`, but there is a `stock/media/stock_xfburn.svg`.
4. Launch Xfburn.
5. If you don't have a burner attached to the system, acknowledge the "no
burners found" dialog.
6. Notice that the icon is missing from the taskbar and application launcher.
7. Close Xfburn.
8. Copy `/usr/share/icons/hicolor/scalable/stock/media/stock_xfburn.svg` to
`/usr/share/icons/hicolor/scalable/apps/stock_xfburn.svg`
9. Launch Xfburn.
10. Notice that the icon is now present in the taskbar and application
launcher.
11. For comparison, after cleaning up the manually-copied file, run the
application on another desktop environment (such as GNOME) and notice the icon
appears correctly in the desktop environment's locations for the icon (for
GNOME, the top bar, and the launcher), even though the icon is not present in
`apps`.

OBSERVED RESULT
- On step 6, the icon is missing from the taskbar and application launcher.

EXPECTED RESULT
- On step 6, the icon should be present in the taskbar and application
launcher, as seen on another desktop environment from step 11.

SOFTWARE/OS VERSIONS
Linux: 6.2.2-arch1-1 (64-bit)
KDE Plasma Version: 5.27.2
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Graphics Platform: Wayland

ADDITIONAL INFORMATION
- This bug was originally reported in Xfburn at
https://gitlab.xfce.org/apps/xfburn/-/issues/57, and investigation led to the
discovery of KDE's behavior differing from another desktop environment's.
- Unsure of whether this was intended behavior or not, I asked about looking
only in `apps` in the Matrix chatroom, and I was directed to file a bug report
for frameworks-kio. If this is the incorrect project, please let me know what I
should do to refile it in the correct project. ^^;
- I do notice that the Installing Application Icons section in the Icon Theme
Specification suggests that application icons should always be under `apps`,
but my interpretation of this section is that it is a suggestion rather than a
hard truth, since the specification for `Icon=` in the Desktop Entry
Specification does not limit the location to just `apps`, and since another
tested desktop environment (GNOME) appears to follow this interpretation.

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

Reply via email to