The original post: /r/linux by /u/ravenravener on 2024-11-19 18:33:24.

Hi everyone, so i’ve seen an app image that had code like this

if [ ! -z "$APPIMAGE" ] && [ ! -z "$APPDIR" ]; then
    MD5=$(echo -n "file://$appimage/" | md5sum | cut -d' ' -f1)
    cp "$APPDIR/{{iconFilename}}" "$HOME/.cache/thumbnails/normal/$MD5.png" >/dev/null 2>&1
    cp "$APPDIR/{{iconFilename}}" "$HOME/.cache/thumbnails/large/$MD5.png" >/dev/null 2>&1
    xdg-icon-resource forceupdate >/dev/null 2>&1
fi

Inside the AppRun basically the script that will start the application bundled in the appimage, the idea was that to put the icon of the app into the thumbnail cache so it displays an icon in the file manager.

I find this wrong because it should be left to the file manager, for example KDE Plasma’s Dolphin seems to already thumbnail appimages, gnome’s file manager does not but perhaps there are plugins that could do that.

Therefore I find this pretty hacky and would prefer to leave it up to the user’s setup instead of forcing a thumbnail in as you start the app.

The owner however states that this is not an issue and is safe and so I wanted to hear from the wider Linux community what your opinions are on it, and if you can come up with more constructive arguments either for or against such a behavior and what if more appimages followed this path.