custom svg icons doesn't show in application menus

Hello,

so my problem is that my girlfriend and I make some custom icons(we changed colors) for applications we use
when I use "kmenuedit" to change the icons everything seems okay on first look, latte-dock is using correct icons for everything and it looks everything okay but when I open any application menu the icons appear as missing, images below

application menus:
image
image

latte-dock:

I was trying to search on the internet but I couldn't find anything like my case, or maybe I used wrong keywords if I did I apologize very much
I was thinking I could fix that if I would replace the icons in the icon theme(not sure, but I probably should try it but that seems little bit odd or like I won't be able to update the icon theme then because it will overwrite my icons and I don't want to overwrite them by my icons everytime I will update icon theme)
I was also thinking about that the image could be too big but it's svg so it should scale however is needed if I'm not wrong so I really have no idea why would it show the icon as missing
I don't know if it is just known bug or something like that
Any idea how could I make the icons show in application menus too, please?

Change the icon in the .desktop file, normally in /usr/share/applications

xircon I tried it and it doesn't look like it works, I still see the missing icon instead of the my icons

Run

kbuildsycoca5 --noincremental

Also log out/in or reboot.

Edit - make sure you put the full path to the icon in the .desktop file. e.g.

Icon=/usr/share/icons/hicolor/scalable/apps/gnome-layout-switcher.svg
1 Like

That did not work too
Something I noticed: When I search for the app in the application menu the icon is visible but not in the pinned one's(favourite) etc..

Probably have to unpin and repin.

I tried that already but still missing icon

Well that is me out of ideas.

1 Like

Thank you very much for your time and effort to help me, I appreciate it, xircon

When you want custom icons, the .desktop file should better be placed in ~/.local/share/applications/
and the icons in ~/.local/share/icons/
and use the real path to the icon inside the desktop file ... restart your session.

1 Like

That did not help too, it still looks like a missing icon in application menus in pinned, recent things etc.. also in Dolphin file manager


The icon itself doesn't show but a preview of the file shows the icon
I did it manually(How you wrote) and no change (also I think that's exactly what kmenuedit does but with GUI)

It all works here. Rebooted into Plasma and:

cd /usr/share/applications
sudo cp crack-attack.desktop ctmp.desktop

Edit:

[Desktop Entry]
Encoding=UTF-8
Name=Crack Attack!
Exec=crack-attack
Icon=/home/steve/Pictures/Quake-II-icon.png <<<<<< Here!
Terminal=false
Type=Application
Categories=Game;BlockGame;
StartupNotify=false

I'm sorry to say this but your custom icon seems to be a png-icon. Does it still work with an svg-icon (as per title)?

1 Like

yes, I did everything correctly
just instead of png I use svg (which should be theoretically better)

EDIT: I can try to export the icons to png and use that and see but the quality would be worse than svg

If I remember correctly, it won't work if you add the .svg at the end of the file name.
Use Icon=../../../foo instead of Icon=../../../foo.svg

4 Likes

Yes, that works, that's amazing, thank you very much saedlar93 and all of you
that's interesting but latte-dock and other things can see the icon with .svg
but applications menus and things like this not
Do you know reason why is it this way?

Too bloody warm, I just randomly selected an image in my pictures doh.

1 Like

okay, I found another thing lul but it is with latte-dock
when I use in .desktop without .svg and the file has .svg the icons are blurry but then I put away from the files .svg then it's not blurry but again the application menu doesn't show the icons
:smiley:
most of the times I don't even use the application menu so I will rather use nice latte-dock icons

I have no idea why.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by