Bug 496178 - Absolute icon paths in desktop files are ignored when icon is displayed in KRunner and Kickoff/kicker/dashboard/etc
Summary: Absolute icon paths in desktop files are ignored when icon is displayed in KR...
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (show other bugs)
Version: 6.2.3
Platform: Arch Linux Linux
: NOR minor
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-12 15:06 UTC by hexchain
Modified: 2024-11-13 17:38 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hexchain 2024-11-12 15:06:53 UTC
SUMMARY
It seems that if the "Icon" property in a desktop file contains a full path, the last part (i.e. "basename") is first used to look up an icon in the icon theme. The actual file will only be used if the icon theme does not contain an icon with the same (file) name.

STEPS TO REPRODUCE
1. Create a desktop file with the following content and place it to ~/.local/share/applications/test-app.desktop:

[Desktop Entry]
Version=1.0
Type=Application
Icon=/tmp/hwinfo.svg
Exec=/usr/bin/true
Name=TestApp

2. Download an SVG icon (e.g. https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/raw/refs/heads/master/Papirus/32x32/apps/firefox.svg) and save it to /tmp/hwinfo.svg

3. Launch KRunner or Kickoff and try to find TestApp.

OBSERVED RESULT
TestApp has the "hwinfo" icon, not the downloaded one.

EXPECTED RESULT
If the "test-app" (desktop file name) icon exists in the icon theme, it should be used for TestApp. If it does not (as in this case), the downloaded SVG icon should be used instead.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.11.6-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 1 Nate Graham 2024-11-13 17:37:51 UTC
Can reproduce! How strange.

The icon is displayed correctly in Task Manager; it's only wrong in KRunner and Kickoff.