ERROR: Siril-1.2.0-beta1-x86_64.AppImage - does not find it's standard scripts

Siril-1.2.0-beta1-x86_64.AppImage - does not find it’s standard scripts

Starting the AppImage, a temporary mount point is created, e.g. /tmp/.mount_sirilxg5070/ with the scripts folder further down:

/tmp/.mount_sirilxg5070/usr/share/siril/scripts

I had to manually ‘guide’ Siril to find this folder in it’s script settings.

ERROR: After a new start of Siril, the ‘temporary(!)’ mount point became obsolete and a new one is created – thus again no scripts are found.

Workaround: After having started Siril and showing it where the (temporary) scripts are located, I simply copied that temporary ‘scripts’ folder into my user space and of course entered that path into the Siril settings.

Example:
rsync -va /tmp/.mount_sirilxg5070/usr/share/siril/scripts ~/.config/siril/

Now the scripts are found but for the price of never being updated when new or changed versions appear.

You can me the scripts where you want. Just the preference

Certainly, I know that.

But it’s a (beta) bug IMHO, when Siril does not find it’s own scripts which are delivered somewhere inside downloaded AppImage.

An AppImage package behaves like a (CD/DVD) ISO image: On startup it is mounted (not unpacked) to a hidden(!!) temporary folder. The mount point changes it’s name randomly on every single Siril start.

If I hadn’t been using Siril for years, then, as a first time user of this AppImage package, I would have been lost: no scripts, no script menu, no hint where to find these (they were there, in the random mount point tree) … just watching the progress wheel in the settings … without anything happening.

I am quite sure this is a consequence of the way AppImages are built by intention: There are so many Linuxes out there, that it would be very hard and not at all efficient for developpers to provide system dependant installation media for every flavour.

This is the main reason why the wonderful AppImage format was developped: It makes software accessible for any recent Linux flavour, because it carrys every library needed within this package – no dependencies anymore!

Similar to an ‘autostart CD’ from ancient times … :smile:

The problem is not easy to solve and I am not sure we will even try, at least soon.
Indeed, at the first start, the temporary mount folder is stored in the configure file. So probably at first start you should see the scripts.
But for the other runs Siril just reads the saved file name, which is wrong.

I’m not a big fan of AppImage, for many reasons.
That’s why, if you are interested, you can also have the flatpak link: Install Siril on Linux | Flathub

Anyway, thx for the report. Will think if I have some good ideas :).

Just a reminder: Siril is available on debian-based OS with a native OS package, so for most linux-based users, AppImage or Flatpak are not the correct way to go.

To fix this we could detect the path of the siril executable at runtime and change the /usr/share location… It is currently hard coded by the configure/meson build process, so maybe we should just inform users of this kind of package that they should install a copy of the scripts in their home dir instead.

A simple approach could be:

  1. During the very first start of Siril a ~/.config/siril/ directory tree gets installed for each user.

  2. Siril knows where it’s temporary (random) scripts directory is located, say e.g.: /tmp/siril-abc123/scripts/.

  3. Siril thus could easily create a symbolic link from user space to it’s temporary directory with a simple: ln -s /tmp/siril-abc123/scripts ~/.config/siril/scripts.

  4. On every later start Siril simply removes that symlink an replace it with the new temporary / random location: rm ~/.config/siril/scripts; ln -s /tmp/siril-defg987/scripts ~/.config/siril

Problem solved!

For custom user scripts a ~/.config/siril/scripts.custom could be provided which would be created on first run, too, and which will never be touched again, when it already exists.

Of course the latter custom scripts/ directory should be added to the list of default script directories in Siril’s settings.

I believe this would work transparently and the programming effort would be minimal – because the concept of multiple scripts directories is already implemented.

Thus, only the symlink of the varying random scripts directory into userspace needs to be updated on every new start of Siril.

HTH