Only one of my AppImages is integrated to launcher with an icon.
Pre-submit checks
- [X] I checked for similar issues beforehand, but could not find any, not even closed ones. I could not add my bug report to any existing issue.
- [X] I am going to take the time to to fill in all the required details. I know that the bug report will be dismissed otherwise.
Describe the bug
except of one, none of my appimage links are represented in the Ubuntu 23.10 menu with icon. Only FreeCAD has an icon.
Expected behavior
Every appimage that displays an appimage when running, whould have a icon.
Steps to reproduce the issue
- download PrusaSlicer 2.6.1.AppImage
- observe nice icon in file manager, and when running
- integrate with AppImageLauncher
- search for the app, and see a boring gear icon.
Screenshots
No response
Distribution and desktop environment
Installed AppImageLauncher version
appimagelauncher_2.2.0-gha111.d9d4c73+bionic_amd64.deb
List of AppImages you tried
see above
Additional context
No response
Having a similar issue with the rpm version on Fedora. I've only installed one AppImage so far and that as well has no icon.
I'm using the Feishin AppImage as an example here. For a sanity check I first checked whether the AppImage even contains an icon:
[tarulia@fedora AppImage-Icons]$ ./Feishin-0.5.1-linux-x86_64_4609d6e04b030cbee58dbce08ac575f0.AppImage --appimage-extract | grep -E "png|svg|icon"
/usr/bin/AppImageLauncher: /lib64/libcurl.so.4: no version information available (required by /usr/bin/../lib/x86_64-linux-gnu/appimagelauncher/libappimageupdate.so)
squashfs-root/feishin.png
squashfs-root/resources/assets/icons
squashfs-root/resources/assets/icons/1024x1024.png
squashfs-root/resources/assets/icons/128x128.png
squashfs-root/resources/assets/icons/256x256.png
squashfs-root/resources/assets/icons/32x32.png
squashfs-root/resources/assets/icons/512x512.png
squashfs-root/resources/assets/icons/64x64.png
squashfs-root/resources/assets/icons/favicon.ico
squashfs-root/resources/assets/icons/icon.icns
squashfs-root/resources/assets/icons/icon.ico
squashfs-root/resources/assets/icons/icon.png
squashfs-root/resources/assets/pause-circle.png
squashfs-root/resources/assets/play-circle.png
squashfs-root/resources/assets/skip-next.png
squashfs-root/resources/assets/skip-previous.png
squashfs-root/usr/share/icons
squashfs-root/usr/share/icons/hicolor
squashfs-root/usr/share/icons/hicolor/0x0
squashfs-root/usr/share/icons/hicolor/0x0/apps
squashfs-root/usr/share/icons/hicolor/0x0/apps/feishin.png
Well, turns out it does, so on we go.
When I check the created desktop-file, it specifies:
Icon=appimagekit_f94d34159c75f778fa724ff0a2d7406a_feishin
Since this is not an absolute path, resolving the location follows the Icon Theme Spec:
Icons and themes are looked for in a set of directories. By default, apps should look in $HOME/.icons (for backwards compatibility), in $XDG_DATA_DIRS/icons and in /usr/share/pixmaps (in that order). Applications may further add their own icon directories to this list, and users may extend or change the list (in application/desktop specific ways).
OK so we essentially have 3 possbilites:
-
$HOME/.icons(for backwards compatibility)- This doesn't exist for me, so the Launcher didn't create it
-
$XDG_DATA_DIRS/icons-
echo $XDG_DATA_DIRS => /home/tarulia/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share- writing to Flatpak locations makes no sense
- surely the launcher can't write to
/usr, and even if it could,/usr/local/share/iconsdoesn't exist andls -R /usr/share/icons | grep feishinreturns nothing, so it's not there either.
-
-
/usr/share/pixmaps- same as above, i.e. not writable and the icon doesn't exist there anyway
So, what that tells me is that I don't see how this was ever supposed to work? Is the Launcher even copying the icons anywhere? And if so... where?
Either way, the desktop-file would have to specify an absolute path since it's outside the spec's directories (I believe "Applications" in the spec in this context refers to the desktop environments looking for the icons).
The most sensible place to put them would probably be either in the same directory as the AppImages get copied to, or an .appimage-icons subdirectory or similar, then write the absolute path into the desktop-file.
This makes me wonder however how one of your Icons is apparently working. Can you check what the corresponding desktop-file in ~/.local/share/applications lists as Icon=?
edit: also seems to be a duplicate of #475
@mihawk90 , thank you for looking into this.
Here are [Desktop Entry] section "Icon=" in some .desktop files:
Freecad's (works)
Icon=appimagekit_aeed089da5260cd08121a2be1e893939_org.freecad.FreeCAD
Immersed (does not work)
Icon=appimagekit_deab67ecc8e5ba7344ddc2069e95c741_Immersed
SavvyCAN (does not work)
Icon=appimagekit_5f12cdf3505a147e554057171d2e67e5_SavvyCAN
MQTT Explorer (does not work)
Icon=appimagekit_535da32c80daaa44be8315bea3616e42_mqtt-explorer
PrusaSlicer (does not work)
Icon=appimagekit_76aa9b99d7be5bb352155fe864f819d3_PrusaSlicer
Mh, so it's all the same as mine are. Which of them has the working icon then?
@mihawk90 Freecad - indicated by "(works)" following the name :smile:
indicated by "(works)"
right... missed that
I'm wondering if it has something to do with the App Name/Identifier then. Out of that list (and my 3 not working AppImages), FreeCAD is the only one with a fully qualified App Identifier (org.freecad.FreeCAD) as opposed to a single word.
But even then I'm wondering where it put the icon...
With that said though, I can replicate this as well. FreeCAD shows up with an icon for me as well.
edit: Found it, but it seems to rely on the Desktop Environment looking in a directory not actually specced (although DEs are free to add their own directories as per the spec):
z% find / -name "appimagekit_c3b4afb816f0a90b141ee52310cea3ff_org.freecadweb.FreeCAD*" 2>/dev/null
/home/tarulia/.local/share/mime/packages/appimagekit_c3b4afb816f0a90b141ee52310cea3ff_org.freecadweb.FreeCAD.xml
/home/tarulia/.local/share/icons/hicolor/scalable/apps/appimagekit_c3b4afb816f0a90b141ee52310cea3ff_org.freecadweb.FreeCAD.svg
Although in that case I'm not sure why it's not finding 2 of my other icons then, because:
z% find /home/tarulia/.local/share/icons/ -name "appimagekit*"
...
/home/tarulia/.local/share/icons/hicolor/scalable/apps/appimagekit_c3b4afb816f0a90b141ee52310cea3ff_org.freecadweb.FreeCAD.svg
/home/tarulia/.local/share/icons/hicolor/0x0/apps/appimagekit_f94d34159c75f778fa724ff0a2d7406a_feishin.png
/home/tarulia/.local/share/icons/hicolor/0x0/apps/appimagekit_4e2c818a51617375f04cc55af4a52f69_losslesscut.png
Not sure if the 0x0 is the issue here, I'm not sure how they are handled given there's nothing in the spec about this.
edit2:
So for shits'n'giggles I symlinked both icons from the 0x0 directory into the 256x256 directory and... well... both have an icon now. So I assume the 0x0 is not handled at all and the reason it works for FreeCAD is because it's an SVG so it goes into scalable.
Well done finding the issue.
based on the find ~/.local/share/icons/ -name "appimagekit*" search, I see that it gathered some data for MQTT explorer and Sidenoder - but failed to get anything for PrusaSlicer & SavvyCAN (which clearly has icons too)
So there are two issues here 1 :it fails to find icons in some apps (PrusaSlicer & SavvyCAN) 2 :512x512 icons are put in 0x0 directory.
There is not much activity on this project, do you know anything about our chances of getting this fixed?
There is not much activity on this project, do you know anything about our chances of getting this fixed?
I don't know, I don't work on this project, I just came here with the same issue and looked into it because it bothered me.
I see that it gathered some data for MQTT explorer and Sidenoder - but failed to get anything for PrusaSlicer & SavvyCAN (which clearly has icons too)
I haven't downloaded or extracted these two so the issue there might be what's described in https://github.com/TheAssassin/AppImageLauncher/issues/475#issuecomment-1003758984
You can check what's inside the AppImage with ./xyz.AppImage --appimage-extract.
However, at least for Feishin it certainly has an icon in /usr/share/icons, although that one is also in 0x0 (see my first comment).
That said, with Feishin being an Electron app, it may as well just be this issue over here: electron-userland/electron-builder#5294
I used resillio sync and had a shell script for symlinking and syncing my appimages and their .desktop files across my computers, making maintenance of appimages easy. I thought AppImageLauncher was a great thing, but now I may go back to my solution.
Any chances of fixing this? Manually changing am icon location seems to fix that. Weirdly some appimages works without providing a full path to a icon file and for others it does not work.