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

The icon seems to be wrong #27

Closed
philmb3487 opened this issue Sep 5, 2024 · 34 comments
Closed

The icon seems to be wrong #27

philmb3487 opened this issue Sep 5, 2024 · 34 comments

Comments

@philmb3487
Copy link

I don't know if this is just my setup, but the appimage icon does not seem to show up correctly in Dolphin:

image

@ivan-hc
Copy link
Owner

ivan-hc commented Sep 5, 2024

First of all we should know how Dolphin detects the "right" icon, my AppImage only contain 4 files and a symlink to the icon

Istantanea_2024-09-05_21-33-58

@philmb3487
Copy link
Author

Howdy Ivan 👋

steam no icon2

seems to happen also with Nemo

@ivan-hc
Copy link
Owner

ivan-hc commented Sep 5, 2024

uhm.... just curious, try to download other random appimages from my repositories https://github.com/ivan-hc#my-appimage-packages I have the suspect that its due to newer compression via appimagetool (my AppImages does not require libfuse2)

@ivan-hc
Copy link
Owner

ivan-hc commented Sep 5, 2024

@Samueru-sama
Copy link
Contributor

I have the xapp appimage thumbnailer with thunar and I have no problem seeing the Steam appimage icon;

image

@philmb3487
Copy link
Author

also test with these appimages by @Samueru-sama

we bundle appimages using the same appimagetool from https://github.com/AppImage/appimagetool

None of these show up with an icon file. Maybe it could be fixed with a more recent (how recent?) version of software, but the point of AppImages is to support applications on any distribution release, so it would be nice to have these working.

My OS is Gentoo (stable profile desktop) with the newly released stable KDE6 packages.

@Samueru-sama
Copy link
Contributor

Samueru-sama commented Sep 6, 2024

also test with these appimages by @Samueru-sama

we bundle appimages using the same appimagetool from https://github.com/AppImage/appimagetool

None of these show up with an icon file. Maybe it could be fixed with a more recent (how recent?) version of software, but the point of AppImages is to support applications on any distribution release, so it would be nice to have these working.

My OS is Gentoo (stable profile desktop) with the newly released stable KDE6 packages.

Try the zen browser appimage that one also uses the static runtime (Cemu and Duckstation also use it).

Looks like KDE has issues displaying the appimage icon for appimages that use the static runtime.

@Samueru-sama
Copy link
Contributor

Samueru-sama commented Sep 6, 2024

@sinetek The next appimage release which will happen after this PR gets merged will make .DirIcon an image and not a symlink, maybe this will fix the issue you have.

I have a feeling that the problem is that DirIcon is a symlink and not an image and as result KDE has trouble picking up, after reading some comments from an unrelated thing lol.

Edit: Now it is merge, try the appimage and let me know.

@philmb3487
Copy link
Author

I tried just now, I don't see anything different.

@Samueru-sama
Copy link
Contributor

I tried just now, I don't see anything different.

Oh what a shame, if you also don't have the icon with zen-browset, cemu, duckstation and pcsx2 then it is an issue with kde.

@philmb3487
Copy link
Author

philmb3487 commented Sep 7, 2024 via email

@Samueru-sama
Copy link
Contributor

Samueru-sama commented Sep 7, 2024

It is not, the issue also happens on Linux Mint (most popular distribution) Anyway don’t be discouraged, the project is cool!

Linux mint using what? If you said linux mint using xfce4, I'm assuming that you would have the xapp-thumbnailer already installed and appimages should show the icon:

image

@ivan-hc
Copy link
Owner

ivan-hc commented Sep 8, 2024

As I said at start, the AppImage only contain4 files and one symlink (the latter now is a real icon instead, as @Samueru-sama said), so it is impossible that a reliabe thumbnail picker is unable to show the icon.

Also, Thunar file manager handles these in all AppImages that use newer methods to be packaged.

Both me and @Samueru-sama have XFCE/Thunar, but while him uses Arch Linux, I use Debian, so the abovementioned thumbnails plugin is missing in my repositories, so I can't see thumbnails at all.

Maybe is your distro in use that has some libraries or plugins outdated if compared with the new specifics for AppImages? Like me? I don't know. But it is also true that AppImages are not all the same, and if some developers compile them keeping the dependency on the EOL library "libfuse2", we got rid of it. Maybe thumbnails are gone for this, in your case, but as packagers and developers who constantly follow the developments of AppImage as a packaging format, we aim for innovation and compatibility with essential system libraries. Thumbnail management is not something we do. While Dolphin, Caya, Tumbnailer... these are the projects that aim to manage files, included in our AppImages.

A thumbnail manager is an extension that must follow our work, since showing icons is its purpose. To handle the thumbnails is something that developers of file managers or their extensions should be able to do, if that is their goal.

That said, I suggest to contact the developers of Dolphin and Caja or of other file managers or of somehow extension... to verify, follow and collect the newer specifics for AppImages. The issue is not of the developers of the AppImages. Sorry.

@ivan-hc ivan-hc closed this as completed Sep 8, 2024
@philmb3487
Copy link
Author

For the record, it's just your appimages that don't show up with an icon, the others work fine.

@Samueru-sama
Copy link
Contributor

For the record, it's just your appimages that don't show up with an icon, the others work fine.

Can you confirm indeed that zen-browser, cemu, etc don't have the same issue? those use the same tooling to make the appimage.

@philmb3487
Copy link
Author

philmb3487 commented Sep 8, 2024

For the record, it's just your appimages that don't show up with an icon, the others work fine.

Can you confirm indeed that zen-browser, cemu, etc don't have the same issue? those use the same tooling to make the appimage.

Ah, I guess there's different tools to create these appimages? The projects you mention also have the same bug. I give my apologies then, I'll accept the WONTFIX and go do something else. 🤷

@Samueru-sama
Copy link
Contributor

Ah, I guess there's different tools to create these appimages? The projects you mention also have the same bug. I give my apologies then, I'll accept the WONTFIX and go do something else. 🤷

The issue is that appimages have this well known issue of having a dependency to libfuse2, libfuse2 has been EOL since like 2020. A lot of distros no longer ship libfuse2 by default.

The solution has been for a few years, but only recently it began to be used by default on some tooling, it is called the type2-static runtime, which this project among others use.

However switching the runtime to be static has had it's on set of issues as you can see, most notably it breaks appimagelauncher which is a popular appimage integration tool, and we just learned that it also breaks some appimage thumbnailers as seen here (but not all as you already saw that thunar with the xapp thumbnailer doesn't have the issue).

So you may want to report the issue first at the runtime and hopefully it is something stupid that can be fixed, if not then the next step is reporting this to the KDE folks.

And yes there is a lot of appimage creation tools, but in this case the issue is likely something with the runtime being static.

@philmb3487
Copy link
Author

philmb3487 commented Sep 8, 2024 via email

@Azathothas
Copy link

Azathothas commented Sep 14, 2024

The actual issue is that you must have every file that is at the root of the squashfs-root have a permission set to -r-xr-xr-x
However, yours have a perm like this:
image

After I changed it to -r-xr-xr-x (Remember every file that is at the root, so including the .DirIcon)
image

And remade the appimage:
image

You can test it yourself: https://pub.ajam.dev/temp/steam_fixed.AppImage

$ sha256sum steam_fixed.AppImage 
228446454a0c18827f302d2a5fa7cf373dd6e88e64e3a6cf9749f1e81b428034  steam_fixed.AppImage

You can get more details and how I discovered this at: https://t.me/VHSgroup/87301/88306
To change the perms:

 chmod "u=rx,go=rx" {ALL_FILES_IN_SQUASHFS_ROOT}
#chmod 555 will also work

@Azathothas
Copy link

Azathothas commented Sep 14, 2024

Update: Upon further discussion/deliberation, it's likely that this issue and "fix" may only apply to me.
I discovered this while I was using nix-appimage to create some Appimages.
Apologies if this didn't help at all.

@philmb3487
Copy link
Author

philmb3487 commented Sep 17, 2024

Update: Upon further discussion/deliberation, it's likely that this issue and "fix" may only apply to me. I discovered this while I was using nix-appimage to create some Appimages. Apologies if this didn't help at all.

No, this works great as a solution!
I'm guessing it's either the +x on the files that does it, or the packaging with appimagetool that works correctly (I have no idea what the unhelpful ivan-hc guy is using here.

image

I just did what you said in your post above, and then
ARCH=x86_64 ./appimagetool-x86_64.appimage ./squashfs-root/

@Azathothas
Copy link

@sinetek Thank you for your confirmation.
I tested/verified that this works on about four separate machines (Isolated & freshly booted).
However, the maintainers said that it didn't work on theirs, which is why I thought it was isolated only to me.
Perhaps, their system's configuration differs too much from a general Distro and that's why they disregarded my solution.

@philmb3487
Copy link
Author

@sinetek Thank you for your confirmation. I tested/verified that this works on about four separate machines (Isolated & freshly booted). However, the maintainers said that it didn't work on theirs, which is why I thought it was isolated only to me. Perhaps, their system's configuration differs too much from a general Distro and that's why they disregarded my solution.

I don't need to touch the files, just unpacking and repacking with appimagetool is enough to get the icon back. I tested this with a lot of broken appimages and it always works.

@Samueru-sama
Copy link
Contributor

Samueru-sama commented Sep 17, 2024

I don't need to touch the files, just unpacking and repacking with appimagetool is enough to get the icon back. I tested this with a lot of broken appimages and it always works.

What appimagetool did you use?

If it is the appimagetool from AppImage/AppImageKit that makes sense, that one is old and still uses the old runtime.

While the appimagetool from AppImage/appimagetool or from probonopd/go-appimage use the static runtime instead.

@Samueru-sama
Copy link
Contributor

Also did this appimage work?

https://pub.ajam.dev/temp/steam_fixed.AppImage

Don't repackage it with appimagetool or anything like that, does the appimage from that link work out of the box?

@ivan-hc
Copy link
Owner

ivan-hc commented Sep 17, 2024

@sinetek I repeat, thumbnail managers should adapt to the work of AppImage packagers, not the other way around. I have over 70 AppImages in my repositories, usability is the focus of my workflow. The concern of an AppImage packager is to make the program run on as many systems as possible, regardless of the Desktop Environment and file manager.

File thumbnails are not a priority, and must be managed by dedicated applications or extensions. In @Samueru-sama case, in XFCE/Thunar on Arch Linux, it worked without these tricks. If what matters most to you are the thumbnails in your files, I think your file manager is wrong at this point.

If what matters to you is how the file looks in the file manager, report the issue to the file manager developers.

I have no idea what the unhelpful ivan-hc guy is using here.

@philmb3487
Copy link
Author

philmb3487 commented Sep 18, 2024

@sinetek I repeat, thumbnail managers should adapt to the work of AppImage packagers, not the other way around. I have over 70 AppImages in my repositories, usability is the focus of my workflow. The concern of an AppImage packager is to make the program run on as many systems as possible, regardless of the Desktop Environment and file manager.

No. There are more than 20 major distributions around, and they do not work on a rolling basis. Meaning an update could be 2+ years away in some cases. Moreover, there are a lot of older (supported) installations, and the point of an AppImage is to offer compatibility to these as well. My angle here is helping newcomers to Linux have a good experience instead of hitting a bumpy road.

@philmb3487
Copy link
Author

Also did this appimage work?

https://pub.ajam.dev/temp/steam_fixed.AppImage

Don't repackage it with appimagetool or anything like that, does the appimage from that link work out of the box?

Hi sam,
Unfortunately the icon doesn't show up either with this image.

@Samueru-sama
Copy link
Contributor

Also did this appimage work?
https://pub.ajam.dev/temp/steam_fixed.AppImage
Don't repackage it with appimagetool or anything like that, does the appimage from that link work out of the box?

Hi sam, Unfortunately the icon doesn't show up either with this image.

Yeah, that pretty much confirms that the issue is due to the runtime, like Ivan said here originally.

Worth noting that the xapp-thumbnailer has no problems showing thumbnails for these appimages in both nemo and thunar.

And also after several days of testing @Azathothas managed to get the Steam appimage to show Icon in dolphin, that is the regular Steam appimage and not the "fixed" one, how I don't know lol.

@Samueru-sama
Copy link
Contributor

Samueru-sama commented Sep 18, 2024

Update I managed to get dolphin to show appimage icons.

All I needed to do was install the libappimage package.

image

Before I was not able to get dolphin to show any icon for any appimage, be it old or new.

@ivan-hc
Copy link
Owner

ivan-hc commented Sep 18, 2024

I'm on Debian Testing, I have installed with dpkg -i the following two .deb packages for Linux Mint Elsie (the latest LMDE):

  • xapp-appimage-thumbnailer
  • xapp-thumbnailers-common

all AppImages I have installed via AM have the thumbnail.

Istantanea_2024-09-18_19-48-04 png

and also Steam available here

Istantanea_2024-09-18_19-48-39

you can see the two packages I have installed manually from https://www.debian.org/distrib/packages

and note that libreoffice is an AppImage requiring libfuse2 that I have repackaged the same way I package my AppImages, and the thumbnail works.

also my old Appimage of wine shows the icon

Istantanea_2024-09-18_19-52-28 png

I downloaded also two Brave and Zen now

Istantanea_2024-09-18_19-54-11 png

everything works as expected.

So I confirm that xapp-appimage-thumbnailer is a cutting edge thumbnail manager, while Dolphin/KDE/Plasma doesn't give a damn about AppImage as a "dead and unworthy packaging format". This is what happens when most of the Linux community focuses all their efforts on Flatpak, while being fooled by AppImage prejudices.

This is the page of the project https://github.com/linuxmint/xapp-thumbnailers just to give you an idea of ​​what deserves attention.

@ivan-hc
Copy link
Owner

ivan-hc commented Sep 18, 2024

Update I managed to get dolphin to show appimage icons.

All I needed to do was install the libappimage package.

And as Samuel says, libappimage is also needed, I installed libappimage-dev from Debian repositories.

@philmb3487
Copy link
Author

philmb3487 commented Sep 21, 2024

Hello everyone, I found the issue. libappimage by itself does not support zstd compressed images, at least not by default,

Squashfs image uses (null) compression, this version supports only xz, zlib. ERROR: appimage_read_file_into_buffer_following_symlinks : sqfs_open_image error: /home/phil/Applications/Steam-1.0.0.81-2-3-x86_64.appimage

The solution is to, 1) activate fusefs support in the libappimage build, and
2) for sys-fs/squashfuse, activate support for zstd.

I think this uses more resources than just using libappimage's default xz compression, since Arch's libappimage goes through fuse, but it works now.

image

@ivan-hc Would you be so kind as to document this in your README.md? I apologize if you feel I've wasted your time with this issue, I'll update the libappimage side of the bug report.

EDIT2: AppImage/appimagetool#68 (comment)

@ivan-hc
Copy link
Owner

ivan-hc commented Sep 21, 2024

Thanks @philmb3487 you are wellcome, I'll redirect new issues on this thread instead or to your last answer.

I repeat, I have 70 Appimages in numerous repositories, and this seems to be a solution to be implemented in the tools that we packagers download and use daily. Once this is solved, in months and years, it will be useless to continue to have this indication on the README. We just have to wait.

Thank you for the research and the work done. See you next time.

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

4 participants