Icons not showing in panel when app closed

On both KDE’s native panel and Latte dock bar, some of the applications have no icon when the app isn’t running. Start the app, and the icon shows, close the app, and the icon goes away (gray box appears). This happens on some, but not all apps, e.g., firefox is fine, virtualbox has the problem.

I’m using the latest stable version of KDE Neon Plasma, all up to date.

FYI as a Gnome desktop user, it’s been a few years since I’ve used KDE, and the latest is looking nice!

can you attach a screenshot please?

Sure!

I simplyfied the panel to only have one app that’s doing this, currently virtualbox.

Virtualbox not running:

Virtualbox running:

While I didn’t figure out how to directly fix the problem, I have the panels configured so they do what I want, and the icons are stable. The key was to add my applications as “widgets” directly within the panel menu, and not in the “icon only task manager” or drag and drop from the other panel or desktop. A bit of a pain, because to add an app as a widget, that specific panel must have an application launcher.

I think the term “widget” is a bit overloaded.

But anyway, I’m happy with my current panel layouts, one as a system panel, and one as an application panel.

That workaround may work, but ultimately we should figure out why this problem is happening.

How did you install Virtualbox?

Can’t remember exactly, but via either Discover or pkcon, from supplied repos. FYI, virtualbox wasn’t the only one that did this. All of my custom .desktop files that I tried did the same thing.

Can you clarify whether it’s from the distro repo or from Flatpak or Snap?

I ask because getting user-facing apps from the actual distro repos isn’t supported on Neon.

It looks like from the repos:

So only flatpak and snaps(ug) for user apps?

So maybe my issue is not understanding how Plasma uses .desktop files. Is there a .desktop file cache that gets updated infrequently? I have my desktop files in ~/.local/shared/applications, but I can edit them (eg Exec=“some new command”) and wait several minutes, and the changes don’t impact the app when I run it via the plasma desktop. Even logging in/out doesn’t show the change.

Ahhhhh the problem is beginning to come into focus.

If you manually edit the .desktop files in ~/.local/share/applications, you need to run kbuildsycoca5 in a terminal window to regenerate the caches.

This is an implementation detail. Normally we consider that you should use the KMenuEdit app to edit apps’ .desktop files, and this app takes care of running kbuildsycoca5 automatically after you make any changes.

Also, yes, installing apps from Neon repos is not supported and that could also be contributing to the problem. In Neon, they want you to get your 3rd-party apps from Flatpak or Snap. This is a Neon-ism; not all distros feel this way about it. But Neon does.

1 Like

First, thanks for your quick support !!!
Moving forward, I’ll (try to) stick with flathub only (';ve avoided snaps, but it’s been a while so am not averse to trying again).

I knew there had to be some sort of serious caching mechanism!

Thanks again, I’ll report back if things are still amiss, much appreciated.

Update, the only version of virtualbox available is via the repos (I’m guessing because it sticks itself into the kernel.) so I’ll keep that in mind. It’s all working as intended for now.

One more update. A few paper cuts and bigger issues:

  • kbuildsycoca5 only updates the app/icon located in the application launcher’s “real categories”, not in “favorites” or “recent”. Also not in the panel. I have to delete those in the fav/recent areas, and re-apply them in the panel.
  • kmenueditor doesn’t seem to have fields for “desktop actions”, so kmenueditor doesn’t help in those cases, Quite a few desktop files have those fields.
  • not strongly related to this thread’s topic, but flathub firefox crashes after some short amount of time. Just kaboom after roughly 3 min. Every time. So I just downloaded binaries from firefox and am running direct.

I really like the look and feel of KDE, but initial customization is frustrating.

This solved my issue - I install Discord from a tarball rather than the repo, and moving that .desktop file to the applications folder caused the discord app to show up in my launcher menu, and now when I pin it to the taskbar, the icon no longer disappears. Thanks for the help!