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

AppImageLauncher silent integration (without showing dialog) #281

Closed
skipperTux opened this issue Jan 4, 2020 · 9 comments
Closed

AppImageLauncher silent integration (without showing dialog) #281

skipperTux opened this issue Jan 4, 2020 · 9 comments
Labels
bug
Milestone

Comments

@skipperTux
Copy link

@skipperTux skipperTux commented Jan 4, 2020

Is it possible to run AppImageLauncher to silently integrate an AppImage (move to ~/Applications and create Desktop Launcher) without showing a dialog? Something like

AppImageLauncher --integrate ~/Downloads/myApp.AppImage
AppImageLauncher -i ~/Downloads/myApp.AppImage

and also remove an AppImage from the system

AppImageLauncher --remove ~/Downloads/myApp.AppImage
AppImageLauncher -r ~/Downloads/myApp.AppImage

The use-case is to install/remove AppImages using scripts or automation tools like Ansible without user interaction, just like apt/yum/dnf package managers. The story is a rollout scenario for Desktop Computers.

I have seen some related discussion in #80, #163 or #150 and I am also aware of the appimagelauncherd daemon. However I think the described use-case cannot be solved using the existing tooling. (Event though I cannot fully setup that daemon because the settings dialog crashes on my Fedora system; upstream bug, see #218.)

Edit: To be more precise, the AppImage shall also not be launched when silently integrating.

@TheAssassin TheAssassin added this to the version-3.0 milestone Feb 4, 2020
@TheAssassin

This comment has been minimized.

Copy link
Owner

@TheAssassin TheAssassin commented Feb 4, 2020

@skipperTux have you seen ail-cli? It provides unattended integration already. Removing isn't supported as of yet, however we can extend the CLI if you want to. Removing is not as critical, though, as the desktop entries will be hidden once the AppImage is gone (and appimagelauncherd as well as AppImageLauncher, the UI, also clean up old desktop files occassionally).

@skipperTux

This comment has been minimized.

Copy link
Author

@skipperTux skipperTux commented Feb 4, 2020

@TheAssassin thank you for making me aware of ail-cli. It looks just like what I was looking for in my issue. Two remarks:

  1. From the cli-help I see the commands
Available commands:
  integrate    Integrate AppImages passed as commandline arguments
  unintegrate  Unintegrate AppImages passed as commandline arguments

It seems a remove command is already supported, however I am not sure what argument to pass as AppImage. During integration, a new filename with a unique Id is generated. Passing this filename is not ideal for scripting, as it is unknown when writing the script (although workarounds exist).

  1. Integration with the cli does not work, it returns an error - see below. The file is copied but the AppImage cannot be started. It works when double-clicking the file, or calling AppImageLauncher. I tested with three different AppImages, Station, balenaEtcher and draw.io Desktop. They all throw the same error of Unknown AppImage format on my Fedora 31 x86_64 system.

Fails

$ ail-cli integrate ~/Downloads/Station-1.63.4-x86_64.AppImage 
ail-cli: /lib64/libcurl.so.4: no version information available (required by /usr/bin/../lib/x86_64-linux-gnu/appimagelauncher/libappimageupdate.so)
Processing /home/user/Downloads/Station-1.63.4-x86_64.AppImage
Moving AppImage to integration directory
ERROR: appimage_register_in_system : Unknown AppImage format: /home/user/Downloads/Station-1.63.4-x86_64.AppImage
Error: Failed to register AppImage in system via libappimage

Works

$ AppImageLauncher ~/Downloads/Station-1.63.4-x86_64.AppImage 
AppImageLauncher: /lib64/libcurl.so.4: no version information available (required by /usr/bin/../lib/x86_64-linux-gnu/appimagelauncher/libappimageupdate.so)
[...]
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.
[...]
Fontconfig warning: "/usr/share/fontconfig/conf.avail/05-reset-dirs-sample.conf", line 6: unknown element "reset-dirs"
[...]
# AppImage is started successfully
@TheAssassin

This comment has been minimized.

Copy link
Owner

@TheAssassin TheAssassin commented Feb 4, 2020

Please provide links to your AppImages, otherwise I cannot inspect the issue...

@skipperTux

This comment has been minimized.

Copy link
Author

@skipperTux skipperTux commented Feb 4, 2020

Links are already in my response, see

I tested with three different AppImages, Station, balenaEtcher and draw.io Desktop.

@TheAssassin

This comment has been minimized.

Copy link
Owner

@TheAssassin TheAssassin commented Feb 4, 2020

Those links don't link to the AppImages. They link to some release pages. I don't want to guess which ones you tested.

Edit: okay, fair enough, for draw.io the link is precise enough.

@TheAssassin

This comment has been minimized.

Copy link
Owner

@TheAssassin TheAssassin commented Feb 4, 2020

I see. There's two issues. First is that the integration directory isn't created automatically. Second the path used for the integration is the one before moving the file. The error message is entirely misleading. libappimage should report that the file is missing, not that the AppImage format is unknown...

@TheAssassin TheAssassin added bug and removed enhancement question labels Feb 4, 2020
@TheAssassin

This comment has been minimized.

Copy link
Owner

@TheAssassin TheAssassin commented Feb 4, 2020

Both have been fixed in 59fecaf and 7771480. Please report if it works for you now.

@TheAssassin TheAssassin closed this Feb 4, 2020
@skipperTux

This comment has been minimized.

Copy link
Author

@skipperTux skipperTux commented Feb 4, 2020

Works like charm. Thank you for the quick fix and for your great work on AppImageLauncher! With your consent I will close this issue.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.