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

[Linux] AppImage Icon doesn't get set with programs like AppImageLauncher #93

Open
dginovker opened this issue Dec 1, 2020 · 7 comments

Comments

@dginovker
Copy link

dginovker commented Dec 1, 2020

When using AppImageLauncher, the AppImage Icon doesn't get set when you "Run and Integrate" the .AppImage into your system.

Error log:

./RuneLite.AppImage 
WARNING: No icons found at "usr/share/icons"
WARNING: Using .DirIcon as default app icon
ERROR: Unable to load image.
ERROR: No icon was generated for: /home/dr_bracket/Applications/RuneLite_a89cceadeb287b5371332a93cb025628.AppImage
WARNING: Unable to resize the application icon into a 128x128 image: "Unable to load image.". It will be written unchanged.
WARNING: Unable to resize the application icon into a 256x256 image: "Unable to load image.". It will be written unchanged.

Then the installation looks like this:
image

Instead of this:
image

I'm not entirely sure why, during my debugging of build-linux.sh, the .DirIcon in the warning shows up in the native-linux folder as it should.

Only tested on Arch Linux - Will test on KUbuntu shortly.

@dginovker
Copy link
Author

dginovker commented Dec 1, 2020

On KUbuntu I get effectively the same warning, but no error:

** (process:4784): WARNING **: 17:13:57.693: No icons found in AppDir/usr/share/icons. Using .DirIcon as fallback

It'd be great if the .DirIcon worked 🤔

@Adam-
Copy link
Member

Adam- commented Dec 1, 2020

Judging by https://docs.appimage.org/reference/appdir.html, I think you would just have to copy an icon into the appdir right around here: https://github.com/runelite/launcher/blob/master/build-linux.sh#L62 ?

@dginovker
Copy link
Author

Unless I'm doing the copying wrong, I can't seem to get it to work. That said, someone smarter should probably look at it rather than trusting me 😄

@Adam-
Copy link
Member

Adam- commented Dec 1, 2020

I think it's
cp ../../appimage/RuneLite.png .DirIcon

@dginovker
Copy link
Author

The .DirIcon has always been there, it's just not getting read for some reason. Maybe it's a bug in AppImageLauncher? (Although it's been this way for as long as I can remember)

@Adam-
Copy link
Member

Adam- commented Dec 1, 2020

are you sure? I don't think so

root@3b39d070b593:/launcher# ls -ahl native-linux/RuneLite.AppDir/
total 2.6M
drwxr-xr-x 3 root root 4.0K Dec  1 13:41 .
drwxr-xr-x 3 root root 4.0K Dec  1 13:41 ..
lrwxrwxrwx 1 root root    8 Dec  1 13:41 AppRun -> RuneLite
-rwxr--r-- 1 root root  85K Dec  1 13:41 RuneLite
-rw-r--r-- 1 root root 2.4M Dec  1 13:41 RuneLite.jar
-rw-r--r-- 1 root root  235 Dec  1 13:41 config.json
drwxr-xr-x 7 root root 4.0K Dec  1 13:41 jre
-rw-r--r-- 1 root root  144 Dec  1 13:40 runelite.desktop
-rw-r--r-- 1 root root  35K Dec  1 13:28 runelite.png

Could probably just symlink it to runelite.png actually.

@kmarius
Copy link

kmarius commented Dec 2, 2020

I think this might be a bug in AppImageLauncher. libappimage tries to detect .DirIcon as png (or an svg, alternatively) but fails. None of the pngs I tried worked, but an svg did. What also worked was putting a copy of the icon in usr/share/icons; files in there just get copied to ~/.local/icons from what I can tell.

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

No branches or pull requests

3 participants