Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

appimaged does not create a .desktop file with an icon #461

Closed
corppneq opened this issue Sep 1, 2017 · 14 comments
Closed

appimaged does not create a .desktop file with an icon #461

corppneq opened this issue Sep 1, 2017 · 14 comments

Comments

@corppneq
Copy link

corppneq commented Sep 1, 2017

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
@probonopd
Copy link
Member

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.)

@corppneq
Copy link
Author

corppneq commented Sep 1, 2017

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

@probonopd
Copy link
Member

probonopd commented Sep 1, 2017

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.

@simoniz0r
Copy link

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.

@probonopd
Copy link
Member

probonopd commented Sep 17, 2017

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 ;-)

@morevnaproject
Copy link

@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 - morevnaproject-org/opentoonz#2)
Link to appimage - https://dev.icystar.com/downloads/OpenToonz-1.2.0.2-morevna-18.01.07-linux64-04bd8.appimage

Thank you!

@KurtPfeifle
Copy link
Contributor

@morevnaproject: this may be related to issue #593

@TheAssassin
Copy link
Member

@morevnaproject replying to #461 (comment):

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.

@morevnaproject
Copy link

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?

@TheAssassin
Copy link
Member

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.

@morevnaproject
Copy link

I will check, thank you!

@morevnaproject
Copy link

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

@TheAssassin
Copy link
Member

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.

@morevnaproject
Copy link

Yes, I did posted the explanation here ^__^ - morevnaproject-org/opentoonz#2 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants