Bug 31053 - new svg icons in cauldron plasma fail to display in menus/desktop/panel unless the full path is given in the packaged .desktop file
Summary: new svg icons in cauldron plasma fail to display in menus/desktop/panel unles...
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: KDE maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-30 19:02 CET by Barry Jackson
Modified: 2024-03-03 17:16 CET (History)
1 user (show)

See Also:
Source RPM: not determined
CVE:
Status comment:


Attachments
Icon in menu (8.04 KB, image/png)
2022-11-01 00:55 CET, Barry Jackson
Details
Correct icon shown with full path (552.86 KB, image/png)
2024-02-05 23:22 CET, Barry Jackson
Details
Icon shown as a black bar with the correct syntax i.e. Icon=remove-old-kernels (569.37 KB, image/png)
2024-02-05 23:23 CET, Barry Jackson
Details

Description Barry Jackson 2022-10-30 19:02:19 CET
Description of problem: I have been trying to figure out why the icon in the new remove-old-kernels package would display in Mga8 but not in Mga9 plasma for a week now.

It is against normal practice to use anything more than the program name for the icon if it is in the correct path, however this seems not to be the case, for this new package. Whether it's plasma5, Inkscape, xdg or the phase of the moon I cannot figure out, it works in Mga8 plasma and in cauldron LXQT so I am baffled.

Long existing packages with svg icons in the same directory seem fine.

I was suspecting the icon so I have re-made it 3 times now in Inkscape in Cauldron. The last time I took a Mageia drakx svg icon and edited it. I saved it as a Generic Inkscape svg and still have the same issue. The icon displayed as a black horizontal bar.
In desperation I added the full path to the icon in the .desktop and it works perfectly. In the menu, when added to the panel and when added as a shortcut to the desktop.

One thing I noticed when trying to run the icon cache update utility was that it complained about a missing theme index when the path exceeded several levels.
The svg icons are in /usr/share/icons/hicolor/scalable/apps/

/bin/gtk-update-icon-cache /usr/share/icons/hicolor/scalable/apps
gtk-update-icon-cache: No theme index file.

However when the path was reduced to:
[baz@localhost ~]$ /bin/gtk-update-icon-cache /usr/share/icons/hicolor
[baz@localhost ~]$

There was no complaint.
Whether this is remotely related I have no idea.

For now all I can do is use the full path to resolve this, but this is against the policy IIUC.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
Comment 1 Lewis Smith 2022-10-31 20:23:49 CET
Thank you for the report.
Having this package on my Cauldron system, its LXDE menu (Tools-System Tools) icon is just a small horizontal bar like an overscore. Do not know what it should be. I can try other desktops when I know.

Barry: can you post a screenshot if possible of the icon correctly displayed in a menu? Be warned: screenshotting selected area of menus is not easy, but can be done.

CC: (none) => lewyssmith

Comment 2 Barry Jackson 2022-11-01 00:55:10 CET
(In reply to Lewis Smith from comment #1)
> Thank you for the report.
> Having this package on my Cauldron system, its LXDE menu (Tools-System
> Tools) icon is just a small horizontal bar like an overscore. Do not know
> what it should be. I can try other desktops when I know.
> 
> Barry: can you post a screenshot if possible of the icon correctly displayed
> in a menu? Be warned: screenshotting selected area of menus is not easy, but
> can be done.

Yes that is what I see in cauldron plasma, but in LXQT it is fine. Try editing the .desktop file to use the full path to the icon, that fixes it for me in cauldron.

https://bugs.mageia.org/attachment.cgi?id=13467
Comment 3 Barry Jackson 2022-11-01 00:55:59 CET
Created attachment 13468 [details]
Icon in menu

This is from Mga8
Comment 4 Lewis Smith 2023-06-04 21:24:00 CEST
Thanks for the screenshots.
Sorry to have left this.
Running Cauldron LXDE, I note that c.f. comment 1, the 'remove old kernels' menu item now has correct icon, rather than the erroneous bar. Will check with Plasma..
Comment 5 Barry Jackson 2023-06-05 10:41:24 CEST
(In reply to Lewis Smith from comment #4)
> Thanks for the screenshots.
> Sorry to have left this.
> Running Cauldron LXDE, I note that c.f. comment 1, the 'remove old kernels'
> menu item now has correct icon, rather than the erroneous bar. Will check
> with Plasma..

Yes, however the rok package has the full path to the icon in the .desktop file which should not be needed. I have not tested removing it recently.
Comment 6 Lewis Smith 2023-06-05 21:36:20 CEST
Tell me exactly where to look, & what for, and I will.
Comment 7 Lewis Smith 2024-01-22 15:06:23 CET
Ping.
Comment 8 katnatek 2024-01-22 20:00:31 CET
I see something like this just once when squidf add a svg for chromium-browser, but the icon comes once I close and start session again
Comment 9 Lewis Smith 2024-02-01 12:16:09 CET
Can we close this, or pass it to the packagers?
Comment 10 Barry Jackson 2024-02-05 23:11:03 CET
(In reply to Lewis Smith from comment #9)
> Can we close this, or pass it to the packagers?

No. It has not changed/been fixed yet.

Changing the 'Icon='  line in /usr/share/applications/remove-old-kernels.desktop 

from: Icon=/usr/share/icons/hicolor/scalable/apps/remove-old-kernels.svg

to: Icon=remove-old-kernels

... still (in cauldron too) causes the icon to display as a horizontal bar.

So using just the name (which is the correct syntax) without the full path and extension fails.

I think I was on the right track (search is not deep enough) in my original post.
Comment 11 Barry Jackson 2024-02-05 23:15:49 CET
I think a log out/in is required to reproduce after making the above change.
Comment 12 Barry Jackson 2024-02-05 23:22:12 CET
Created attachment 14333 [details]
Correct icon shown with full path
Comment 13 Barry Jackson 2024-02-05 23:23:28 CET
Created attachment 14334 [details]
Icon shown as a black bar with the correct syntax i.e. Icon=remove-old-kernels
Comment 14 Barry Jackson 2024-02-05 23:26:50 CET
It shows as a white bar when using Breeze Dark theme ;)
Also a log out/in is enough to update the icon cache.
Comment 15 Lewis Smith 2024-02-06 21:16:56 CET
Thanks for revisiting this.

Assigning at last to the KDE/Plasma maintainers.

CC: lewyssmith => (none)
Assignee: bugsquad => kde

Comment 16 David GEIGER 2024-03-03 17:16:49 CET
Maybe more a user config issue? I have any problem with any desktop svg/png icons right now on my daily Cauldron system.

CC: (none) => geiger.david68210


Note You need to log in before you can comment on or make changes to this bug.