TheAssassin / AppImageLauncher

Helper application for Linux distributions serving as a kind of "entry point" for running and integrating AppImages
https://assassinate-you.net/tags/appimagelauncher/
MIT License
5.39k stars 253 forks source link

integrating an app should also add symlink in the binaries dir #385

Open eadmaster opened 3 years ago

eadmaster commented 3 years ago

Is your feature request related to a problem? Please describe. Integrating an app should also add a symlink in the user binaries dir, not just in the launch menu.

Describe the solution you'd like After installing ksnip-1.8.0-x86_64.AppImage i expect a symlink $HOME/.local/bin/ksnip to be created (pointing to $HOME/Applications/ksnip-1.8.0-x86_64_*.AppImage).

Describe alternatives you've considered Manually creating symlinks after integrating each app, which is annoying.

Additional context This way i will be able to easily start the app from the cmdline, in addition to the launch menu.

TheAssassin commented 3 years ago

There is no reliable way to read some sort of "app name" from the available metadata that would allow for, like, recognizing which "app" an AppImage provides, and do stuff like recognizing semantic versioning and always provide that symlink for the latest version only.

That's the main reason why features that rely on such a "semantic detection" of "the app" in an AppImage have not been implemented yet. I don't like to implement unsafe features that rely merely on guesswork. That problem needs to be solved first, ideally upstream. Then, a whole bunch of features could be implemented.

eadmaster commented 3 years ago

i see your point, my idea was simply to derive the "app name" from the input AppImage filename itself, instead of the metadata, like in the example above: ksnip-1.8.0-x86_64_9428c658b63585e2b737d8bb77ba553f.AppImage -> ksnip (maybe with an extra lowercasing step).

Obvisly there are edge cases to consider when the filename is not properly formatted, name clashes, etc. In these cases being conservative, showing an error and creating no symlink should be ok.

EDIT: as alternative a more reusable solution could be providing a way to set up an user-defined post-integration shell script, that can be used to do multiple things like creating symlinks, integrating the app in non-standard DEs, etc.

eadmaster commented 3 years ago

just found this tool that does exactly this: https://github.com/srevinsaju/zap