Appimagekit: appimaged does not create a .desktop file with an icon

Created on 1 Sep 2017  路  14Comments  路  Source: AppImage/AppImageKit

The .desktop file created by appimaged has no working icon.
The .desktop file created by the wire appimage itself does.

I am using appimaged version: continuous-1-gd35c990
and Wire: wire-2.12.2729-x86_64.AppImage

appimaged .desktop file

cat appimagekit_1b9d6ec366dee305f642f1c4f439f8e0-wire.desktop 
[Desktop Entry]
Name=Wire
Comment=Modern communication, full privacy.
Exec=/home/pbeccard/.local/bin/wire-2.12.2729-x86_64.AppImage
Terminal=false
Type=Application
Icon=appimagekit_1b9d6ec366dee305f642f1c4f439f8e0_wire
X-AppImage-Version=2.12.2729.38
X-AppImage-BuildId=94513460-fe99-11a6-2e8a-8d40839d6dcf
Categories=Network
TryExec=/home/pbeccard/.local/bin/wire-2.12.2729-x86_64.AppImage
X-AppImage-Comment=Generated by appimaged continuous-1-gd35c990
X-AppImage-Identifier=1b9d6ec366dee305f642f1c4f439f8e0

wire appimage .desktop file

cat appimagekit-wire.desktop 
[Desktop Entry]
Name=Wire
Comment=Modern communication, full privacy.
Exec="/home/pbeccard/.local/bin/wire-2.12.2729-x86_64.AppImage" %U
Terminal=false
Type=Application
Icon=appimagekit-wire
X-AppImage-Version=2.12.2729.38
X-AppImage-BuildId=94513460-fe99-11a6-2e8a-8d40839d6dcf
Categories=Network
X-Desktop-File-Install-Version=0.23
X-AppImage-Comment=Generated by /tmp/.mount_TBbc5F/AppRun
TryExec=/home/pbeccard/.local/bin/wire-2.12.2729-x86_64.AppImage

Most helpful comment

I believe appimaged might copy the whole tree to ~/.local/share/icons/. Check whether the files are available in ~/.local/share/icons/default/128x128/.... If appimaged has copied them there, then I'd say your desktop environment doesn't like that directory, and you should consider installing them into hicolor by default. As far as I understand the Freedesktop standard, hicolor is pretty much the default icon theme name which is understood by all desktop environments.

All 14 comments

Most likely there is no icon supplied in usr/share/icons/... in the Wire AppImage.
Investigation needed. (Note to self: Should a dd a check for this to AppImageHub, and possibly ask electron-builder to put the icons there.)

Than why does the desktop file that the wire appimage adds itself does have an icon?

I cannot download the Wire AppImage right now but possibly it does not provide the icon in usr/share/icons/... where appimaged expects it to be. The icon for the desktop file that the Wire AppImage adds itself could be copied from any location (e.g., from the root directory of the AppImage), but appimaged currently requires the icon to (also) be in usr/share/icons/... due to https://github.com/AppImage/AppImageKit/issues/258#issuecomment-2543.

IMO, it's kind of weird for appimaged to expect the icon to be there when you require an icon to be in the base AppImage directory when building it. It would make more sense for appimaged to use the icon that you know is going to be there.

It's due to desktops (e.g., KDE Plasma) expecting icons in very specific directories (that have the icon size in their name) in order for it to work. Yes, it's a bit anachronistic, but it's the way it is. Otherwise appimaged would have to figure out the size of the icon on the fly and copy it to an appropriate location. Can be done, someone _just_ needs to write the code ;-)

@probonopd Can you please clarify which exact path AppImaged expects icons to be located?

Is it usr/share/icons/hicolor/128x128/ or usr/share/icons/hicolor/128x128/apps/?

I already have icons in usr/share/icons/default/128x128/apps/, but this seems to be not working (see issue about this here - https://github.com/morevnaproject/opentoonz/issues/2)
Link to appimage - https://dev.icystar.com/downloads/OpenToonz-1.2.0.2-morevna-18.01.07-linux64-04bd8.appimage

Thank you!

@morevnaproject: this may be related to issue #593

@morevnaproject replying to https://github.com/AppImage/AppImageKit/issues/461#issuecomment-360693189:

Is it usr/share/icons/hicolor/128x128/ or usr/share/icons/hicolor/128x128/apps/?

There's a Freedesktop standard discussing the icon locations. See https://standards.freedesktop.org/icon-theme-spec/latest/ar01s03.html.

In the theme directory are also a set of subdirectories containing image files. Each directory contains icons designed for a certain nominal icon size and scale, as described by the index.theme file. The subdirectories are allowed to be several levels deep, e.g. the subdirectory "48x48/apps" in the theme "hicolor" would end up at $basedir/hicolor/48x48/apps.

I'd say the latter seems more correct. However, most people put their icons into $basedir/hicolor/<resolution>/.

We might have to discuss desktop file and icon locations more thoroughly in our wiki. CC @probonopd.

I'd say the latter seems more correct. However, most people put their icons into $basedir/hicolor//.

I understand. But I already have an icon file in usr/share/icons/default/128x128/apps/ (note "default") and appimage daemon still installs a desktop file with missing icon. Does icon should be explicitly placed into "hicolor" subdir?

I believe appimaged might copy the whole tree to ~/.local/share/icons/. Check whether the files are available in ~/.local/share/icons/default/128x128/.... If appimaged has copied them there, then I'd say your desktop environment doesn't like that directory, and you should consider installing them into hicolor by default. As far as I understand the Freedesktop standard, hicolor is pretty much the default icon theme name which is understood by all desktop environments.

I will check, thank you!

@TheAssassin Thank you for explanations on how AppImage handles usr/share/icons/. That helped me to solve the issue! ^__^

I think we can safely add the tag "not appimaged's fault" to your use case. But you should explain your solution for future users here so we can give them a link to your explanation.

Yes, I did posted the explanation here ^__^ - https://github.com/morevnaproject/opentoonz/issues/2#issuecomment-361033304

Was this page helpful?
0 / 5 - 0 ratings