the Inkscape-AppImage .desktop reminded me:
If it's
about a console based app image like image- or graphicsmagic you can do the following:
As root create a softlink to the app image and name it like the program you want to use.
In my example it's about ImageMagick-23e57a6-clang-x86_64.AppImage and ImageMagick (and GraphicsMagick) usually use softlinks named as the function that link to the main binary, but that could be different for different versions.
See how I done it with the example of mogrify:
First as root create a softlink named mogrify that links to the appimage in a folder that is in $PATH - I use /usr/local/bin since it's the Unix System Resource /
local / binary folder and the very folder meant for your local scripts, programs and … maybe you already guessed it - softlinks.
(Though "bin" for "binary" also includes scripts and not only binaries in its strict technical sense)
Like so:
Code: Select all
root@porteus:/# ln -s /5/bin/ImageMagick-23e57a6-clang-x86_64.AppImage /usr/local/bin/mogrify
and then you can just use mogrify as if ImageMagick is installed in your system:
Code: Select all
guest@porteus:/usr/local/bin$ ls -l mogrify
lrwxrwxrwx 1 root root 48 Dec 3 18:11 mogrify -> /5/bin/ImageMagick-23e57a6-clang-x86_64.AppImage
guest@porteus:/usr/local/bin$ ./mogrify |head
Version: ImageMagick 7.0.10-3 Q16 x86_64 2020-03-29 https://imagemagick.org
Copyright: © 1999-2020 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC
Delegates (built-in): bzlib djvu fontconfig freetype gvc jbig jng jpeg lcms lqr lzma openexr png raqm tiff wmf x xml zlib
Usage: mogrify [options ...] file [ [options ...] file ...]
Image Settings:
-adjoin join images into a single multi-image file
-affine matrix affine transform matrix
Of course you would have to create the other symlinks for the other functionalities of ImageMagick as well like convert or identify.
If an existing program already uses that name, you would have to rename the existing program - that can be an issue since then on your tweaked system the console program of say "identify" is not what it would be on all other systems, and a person unfamiliar with your setup executing "identify" would expect the original "identify" and not the one by ImageMagick.
And you can run into issues as well when you are on a Porteus that has its standard setup, you executing "identify" expecting it to be the function of ImageMagick - only to have executed the original program or script by that name.
But fret not, neither convert nor identify do exist by default:
Code: Select all
guest@porteus:/usr/local/bin$ identify
bash: identify: command not found
guest@porteus:/usr/local/bin$ convert
bash: convert: command not found
So, just like with mogrify create as root symlinks targeting the same AppImage - just name one convert and the other identify.