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 seems to be broken, failing to integrate with AppImageLauncher #34

Closed
henriquecolini opened this issue Aug 2, 2023 · 4 comments
Labels
bug Something isn't working completed help wanted Extra attention is needed

Comments

@henriquecolini
Copy link

Description of the Problem

The Linux AppImage seems to be broken. I can run it just fine, but there is no icon, and it fails to be integrated to the system with AppImageLauncher. The logs suggest that both the icon and the desktop entry aren't working.

This has been verified to not be an issue with AppImageLauncher, as I've tested other AppImages and they integrate to the system just fine.

To Reproduce
Steps to reproduce the behavior:

  1. Download the latest Linux release of UnityHubNative.
  2. Have AppImageLauncher installed in your system.
  3. Unzip and make the UnityHubNative AppImage executable.
  4. Run the AppImage, and integrate it to the system.

Expected behavior
The AppImage gets integrated to the system as usual.

Screenshots and/or logs
Screenshot from 2023-08-02 17-47-42
Screenshot from 2023-08-02 17-48-06

When running from a terminal, we get the following logs:

$ ./UnityHubNative.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/henrique/Applications/UnityHubNative_856452fd4606b11d68f9e6b7d15a6679.AppImage
ERROR: appimage_register_in_system : Missing Desktop Entry
Directory '/home/henrique/.local/share/mime/packages' does not exist!

Computer information:

  • OS: Ubuntu 22.04.2 LTS

Additional context
Just for comparison, these are the logs when integrating the draw.io AppImage to the system. There is a bunch of other icon extraction logs in here, one for each icon size. I've ommited them for simplicity.

Extracting usr/share/icons/hicolor/1024x1024/apps/drawio.png to "/home/henrique/.local/share/icons/hicolor/1024x1024/apps/appimagekit_c316550eb423e6c34d30fe7c366e5806_drawio.png"
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.
gtk-update-icon-cache: Cache file created successfully.
Directory '/home/henrique/.local/share/mime/packages' does not exist!
@Ravbug Ravbug added help wanted Extra attention is needed bug Something isn't working labels Aug 3, 2023
@Ravbug
Copy link
Owner

Ravbug commented Aug 3, 2023

Hi, thanks for the detailed report!

I am not very knowledgeable with AppImage, so I'm not sure how to fix it.

This is what the inside of the AppImage looks like:
image
.DirIcon appears to be a copy of the xpm (somewhat suspicious). This is the contents of UnityHubNative.desktop:

[Desktop Entry]
Type=Application
Name=UnityHubNative
Icon=UnityHubNative
Categories=X-None;

Do you see anything obviously wrong?

@henriquecolini
Copy link
Author

Hi! I'm not very knowledgeable with AppImage either, but I did spend a few hours studying your code, the code of some other working AppImages, and that of libappimage itself. I managed to pinpoint the exact line of code where the error originates from, which made me realize the issue was probably with a broken .desktop file.

And, indeed, as it turns out, your .desktop is missing an Exec key:

Exec=AppRun

Without this, it's impossible to integrate the app to the system, as it does not know what to actually run. The AppImage itself is still able to run, as it doesn't need the .desktop to run.

This does not fix the missing icons, however. In order to fix that, your AppDir needs to have the icons inside usr/share/icons. You can actually have icons of many sizes, and for varying system themes. The default place where the icons are looked up are in usr/share/icons/<theme>/app/<size>/<appName>. The standard fallback theme is hicolor and the only available size in this repo is 512x512, so placing the icon in usr/share/icons/hicolor/app/512x512/UnityHubNative.xmp fixes the issue.

As not to have duplicates, it's common for the root-level .DirName and UnityHubNative.xmp to be symlinks to one of the provided icons.

I'm finishing up a pull request that does these fixes. Hope to publish it in the next hour or so.

While we're at it- what do you think of a new logo? I could help with that as well.

@henriquecolini
Copy link
Author

The PR (#35) has been made! Works perfectly on my end, but it would not hurt to test on other machines.

@Ravbug
Copy link
Owner

Ravbug commented Aug 3, 2023

Awesome, thank you so much for your help! I tested it and it appears to work for me as well.

I appreciate your offer to help on a new icon, but at the moment I don't really want to change the current one.

Thanks again!

@Ravbug Ravbug closed this as completed Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working completed help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants