Bug 455702 - Icon missing after installing an application from Flatpak
Summary: Icon missing after installing an application from Flatpak
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 5.25.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 455979 455981 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-21 08:43 UTC by Alberto Garcia
Modified: 2022-11-21 09:48 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 5.101
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alberto Garcia 2022-06-21 08:43:06 UTC
SUMMARY
After installing an app from Flatpak the launcher appears on the application menu and the panel. However instead of the proper icon from the app what you see is an "empty page" icon (I believe it's application-x-zerosize).

The launcher itself works fine and Firefox opens as expected. Also, after restarting the desktop session the correct icon appears.

Note: this only happens with apps installed from Flatpak. If you install Firefox from the distribution's package manager then the Firefox icon appears correctly right away without having to restart anything.

STEPS TO REPRODUCE
1. Open a terminal and type 'flatpak install firefox' (choose the /stable branch)
2. Wait a few seconds, go to the application menu -> Internet and look at the Firefox launcher
3. Alternatively look at the Firefox launcher on the panel.

OBSERVED RESULT
Firefox is using the incorrect icon

EXPECTED RESULT
Firefox is using the well-known Firefox logo

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 5.25.0
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5
Comment 1 David Edmundson 2022-06-21 08:55:34 UTC
Can you confirm if it happens with all apps; such as installing supertux from discover?
Firefox has some quirks due to it being on the panel, the path through prefferredbrowser://
Comment 2 Alberto Garcia 2022-06-21 10:28:32 UTC
(In reply to David Edmundson from comment #1)
> Can you confirm if it happens with all apps; such as installing supertux
> from discover?
> Firefox has some quirks due to it being on the panel, the path through
> prefferredbrowser://

I tried a few more apps. The same problem happens with:

- Spotify
- ScummVM
- Steam
- Calibre

It does NOT happen with:

- Telegram
Comment 3 Alberto Garcia 2022-06-21 10:30:14 UTC
I forgot: it also does NOT happen with SuperTux
Comment 4 Alberto Garcia 2022-06-21 10:38:21 UTC
Hmmm... I tried again starting with a fresh session and this time the SuperTux icon didn't appear.

Then I repeated the same process with Telegram and this one still shows the correct icon.

Both apps installed from Discover.
Comment 5 Harald Sitter 2022-07-14 12:23:48 UTC
*** Bug 455979 has been marked as a duplicate of this bug. ***
Comment 6 Harald Sitter 2022-07-14 12:24:11 UTC
*** Bug 455981 has been marked as a duplicate of this bug. ***
Comment 7 David Redondo 2022-11-21 09:48:11 UTC
Git commit 2663ef41927f4414ee2f305f5bb1d44e4670dabf by David Redondo.
Committed on 21/11/2022 at 09:47.
Pushed by davidre into branch 'master'.

Watch for icons directory changes from KDED

Upon KIconTheme construction folders are checked to exist and only
existing ones are used later for lookup of icons.
Now consider that  a new program is installed and it installs its
icon into a  directory inside XDG_DATA_DIRS that before did either not
contain an 'icons' directory at all or there was no folder of
the specific theme  at this specific location.
A typically long running program that  wants to display such icons
like an  application launcher, taskmanager, system monitor  or
window manager won't be able to find these icons.
KDED can watch for 'icons' directories or new theme directories
(subfolders of 'icons' and notify running applications.
KDED seems the correct place to watch for such events, it alreay
does so for a bunch of subfolders of XDG_DATA_DIRS.
FIXED-IN:5.101

M  +17   -2    src/kded.cpp

https://invent.kde.org/frameworks/kded/commit/2663ef41927f4414ee2f305f5bb1d44e4670dabf