Bug 507224 - Application Menu ignore Icon setting written in desktop file.
Summary: Application Menu ignore Icon setting written in desktop file.
Status: RESOLVED DUPLICATE of bug 493034
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Menu (Kicker) widget (other bugs)
Version First Reported In: 6.4.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-07-19 11:25 UTC by BryanLiang
Modified: 2025-09-29 14:34 UTC (History)
2 users (show)

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


Attachments
the desktop file of android-studio (316 bytes, text/plain)
2025-08-09 09:59 UTC, BryanLiang
Details
the desktop file of android-studio (316 bytes, text/plain)
2025-08-09 09:59 UTC, BryanLiang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BryanLiang 2025-07-19 11:25:10 UTC
SUMMARY
As title.

There are two icons for Android Studio installed in my system. One is from breeze icon theme, and the other one is shipped with android studio package from AUR.

The Icon key in desktop file is set to use the AUR one, but the breeze one is used in Application Menu and Krunner. Plus, the wired thing is that if you pin the desktop entry to the panel, the AUR one is used.

STEPS TO REPRODUCE
No reproduce steps.

OBSERVED RESULT
The breeze icon is used in Application Menu and Krunner while Icon key is set to use the AUR one.

EXPECTED RESULT
Icon follows Icon key written in desktop file.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.4.3
KDE Frameworks Version: 6.16.0
Qt Version: 6.9.1
Kernel Version: 6.15.6-arch1-1-cjktty (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800H with Radeon Graphics
Memory: 16 GiB of RAM (13.5 GiB usable)
Graphics Processor: AMD Radeon Graphics


ADDITIONAL INFORMATION
Here are two screenshot of the situation:
https://sm.ms/image/oACRJmspjU7XyTh
https://sm.ms/image/GYPR1EbKc6veWXI
Comment 1 TraceyC 2025-07-23 22:21:53 UTC
Thanks for the bug report. So that I can try to reproduce this, can you please share the way, step by step, you changed the icon for the application? There are a few ways to do it (through the menu, editing files etc). Thanks.
Comment 2 BryanLiang 2025-07-24 00:24:57 UTC
OK, here are the steps that possibly reproduce the problem:

1. Make sure you're using Arch Linux and install `plasma-meta` package to use KDE Desktop.
2. Download the tarball here: https://limewire.com/d/wSxz6#45NhbR5FDg, sha256sum: cb4f89ce50af004dedca68d73b963c2d79ecb6ece8d6d860aa77e387c72dc792
3. Extract the tarball and get inside
4. Run `makepkg -sic` to build and install the package
5. Pin the android-studio from Application Menu to the panel
Comment 3 TraceyC 2025-07-24 17:13:06 UTC
(In reply to BryanLiang from comment #2)
> OK, here are the steps that possibly reproduce the problem:
> 
> 1. Make sure you're using Arch Linux and install `plasma-meta` package to
> use KDE Desktop.
> 2. Download the tarball here: https://limewire.com/d/wSxz6#45NhbR5FDg,
> sha256sum: cb4f89ce50af004dedca68d73b963c2d79ecb6ece8d6d860aa77e387c72dc792
> 3. Extract the tarball and get inside
> 4. Run `makepkg -sic` to build and install the package
> 5. Pin the android-studio from Application Menu to the panel

Thank you for the additional detail. I've taken a look at the AUR package you linked to, and the official Google download source tarball.

From the screenshots:
- Icon in /usr/share/application/android-studio.desktop, which is the one provided by AUR and shown in the panel (blue icon on white background)
/usr/share/icons/hicolor/scalable/apps/android-studio.svg
This is also the icon provided by Google in their official download.

- Icon in App Menu (green background from Breeze)
archos/usr/share/icons/breeze/apps/48/android-studio.svg

In the pkgbuild file, this is how the icons are installed. They are placed in /opt/android-studio/ and then symlinked to  /usr/share/icons/hicolor/scalable/apps (where the .desktop file expects them)
  install -d $pkgdir/{opt/$pkgname,usr/bin,usr/share/icons/hicolor/scalable/apps}
  ln -s /opt/android-studio/bin/studio.svg $pkgdir/usr/share/icons/hicolor/scalable/apps/$pkgname.svg

**To summarize**
- This doesn't look like a problem with the AUR package
- Perhaps the App Menu & kicker aren't finding the icon specified in the .desktop file (maybe because of the symlink) and falling back to the Breeze icon
Comment 4 BryanLiang 2025-07-25 04:37:57 UTC
Thanks for your investigation, I do not think symlink will cause this problem. Another package `intellij-idea-ultimate-edition` also use symlink for the icon, but it doesn't has this problem. 

Here is the screenshot for the situation: https://sm.ms/image/zhN3emI9bGBlVry. 

Here is the PKGBUILD tarball for `intellij-idea-ultimate-edition`: https://limewire.com/d/UilY5#QcGL8n4Dfg, sha256sum: a96fa4318062d7a75511d5f8c06d9e73d4a3ac963b1c8136b59ceee035603b51
Comment 5 TraceyC 2025-07-25 17:23:44 UTC
Thanks for that detail, that's useful. Something that is probably relevant is that the Breeze icon for Android Studio is different than the one they ship. I saw that most other icons for Breeze were the same as the ones in the hicolor/scalable/apps directory.

Can you check to see if the icon in both these locations look the same? 

/usr/share/icons/breeze/apps/48
/usr/share/icons/hicolor/scalable/apps
Comment 6 BryanLiang 2025-07-26 00:26:35 UTC
(In reply to TraceyC from comment #5)
> Thanks for that detail, that's useful. Something that is probably relevant
> is that the Breeze icon for Android Studio is different than the one they
> ship. I saw that most other icons for Breeze were the same as the ones in
> the hicolor/scalable/apps directory.
> 
> Can you check to see if the icon in both these locations look the same? 
> 
> /usr/share/icons/breeze/apps/48
> /usr/share/icons/hicolor/scalable/apps

Of course. 

Here is the screenshot: https://sm.ms/image/4VCM5nAbxuSkZyq

They do not look the same.
Comment 7 TraceyC 2025-07-28 16:22:26 UTC
Thanks for the screenshot of the Android Studio icons. Can you please do the same for `intellij-idea-ultimate-edition` ? Thanks.

I suspect the icon looks the same, and that's why the bug is not apparent with that app.
Comment 8 BryanLiang 2025-07-28 16:28:57 UTC
(In reply to TraceyC from comment #7)
> Thanks for the screenshot of the Android Studio icons. Can you please do the
> same for `intellij-idea-ultimate-edition` ? Thanks.
> 
> I suspect the icon looks the same, and that's why the bug is not apparent
> with that app.

Sorry that the breeze theme doesn't provide the icon for `intellij-idea-ultimate-edition` , the only icon for it is shipped with its AUR package. So it is not affected by this bug.

Actually `android-studio` is the only package in my system that encounters this problem.
Comment 9 BryanLiang 2025-07-28 17:05:38 UTC
Screenshot for comment #8
Comment 10 BryanLiang 2025-07-28 17:06:14 UTC
https://sm.ms/image/YHDel7ZoxC6pPcK
Comment 11 TraceyC 2025-07-30 20:09:22 UTC
I am unable to reproduce this with Skanpage on git-master or Plasma 6.4.3.

skanpage has an svg icon in both directories:
/usr/share/icons/breeze/apps/48
/usr/share/icons/hicolor/scalable/apps

I copied a different icon to here and rebooted
/usr/share/icons/breeze/apps/48/skanpage

In /usr/share/application/ the Icon directory is not explicitly set, it only says
Icon=skanpage
 
Then I looked at skanpage in the Application Menu / Krunner, I see the icon in scalable/apps, not the one in the breeze directory

I'll let someone more familiar with the icon hierarchy take a look
Comment 12 Nate Graham 2025-08-08 18:41:21 UTC
I'm starting to suspect this is Bug 493034, especially if the icon key in the .desktop file is expressed as an absolute path.

Can you attach the .desktop file for this app?
Comment 13 BryanLiang 2025-08-09 09:59:19 UTC
Created attachment 183904 [details]
the desktop file of android-studio
Comment 14 BryanLiang 2025-08-09 09:59:41 UTC
Created attachment 183905 [details]
the desktop file of android-studio
Comment 15 BryanLiang 2025-08-09 10:00:31 UTC
(In reply to Nate Graham from comment #12)
> I'm starting to suspect this is Bug 493034, especially if the icon key in
> the .desktop file is expressed as an absolute path.
> 
> Can you attach the .desktop file for this app?

I uploaded the desktop file for this app just now.
Comment 16 Nate Graham 2025-08-11 19:19:51 UTC
> Icon=/usr/share/icons/hicolor/scalable/apps/android-studio.svg

Yep, exactly as I suspected. It's Bug 493034.

*** This bug has been marked as a duplicate of bug 493034 ***
Comment 17 BryanLiang 2025-09-28 04:37:26 UTC
It seems that android studio icon from breeze theme is removed in 6.18.0. Icons in Application Menu and panel are the same now.
Comment 18 Nate Graham 2025-09-29 14:34:58 UTC
Makes sense; by removing the theme icon; we no longer trigger the issue in Bug 493034. That's still the root cause, though.

*** This bug has been marked as a duplicate of bug 493034 ***