Open spvkgn opened 4 months ago
I think it is not possible to use sudo
inside AppImages due to how FUSE works; but you can launch the AppImage with sudo
.
@probonopd I could extract the AppImage via extract-and-run feature to avoid FUSE limitations, but with this unable to use sudo
as well:
$ APPIMAGE_EXTRACT_AND_RUN=1 ./bash-5.0.16-x86_64.AppImage
$ sudo $APPDIR/usr/bin/head -n1 /etc/sudoers
sudo: unable to execute /tmp/appimage_extracted_dd6d72343c6dc5f80fba20c2a94f5db5/usr/bin/head: No such file or directory
Looks like this bug comes from here - any binary which is outside of AppImage can't run another binary inside the AppImage:
> $APPDIR/bin/bash -c '$APPDIR/usr/bin/head -n1 /etc/os-release'
PRETTY_NAME="Ubuntu 22.04.2 LTS"
> /bin/bash -c '$APPDIR/usr/bin/head -n1 /etc/os-release'
/bin/bash: line 1: /tmp/appimage_extracted_dd6d72343c6dc5f80fba20c2a94f5db5/usr/bin/head: No such file or directory
I don't think it's a good idea for binaries outside of the AppImage to try to launch binaries inside the mounted AppImage.
Use this simple
AppImageBuilder.yml
to build the AppImage withappimage-builder
:Check the AppImage is working - OK:
Run the AppImage and execute any binary inside AppImage - OK:
Execute any binary inside AppImage with
sudo
, for instance, reading/etc/sudoers
contents - it fails with error "command not found":