-
-
Notifications
You must be signed in to change notification settings - Fork 585
Description
Hi, we're having a strange issue over here at Etcher, an image writer: executing any command as sudo from the AppImage once its mounted outputs command not found. The executable indeed has execution permissions for everyone, and it can be executed normally without sudo.
Maybe this is the expected AppImages behaviour but let me share our use case: The entry point of our desktop application makes the app execute as a desktop app or a CLI tool depending on the value of an environment variable, which is ELECTRON_RUN_AS_NODE. The actual writing functionality is implemented in the CLI version, the GUI forks itself with ELECTRON_RUN_AS_NODE=1 (causing the CLI to run as a child process) and the CLI version emits state information back to the parent.
Since writing to devices requires elevated privileges, the GUI forks itself using gksudo, pkexec or kdesudo, depending on what's found on the client's machine, however we get the above mentioned error when forking the AppImage entry point as sudo.
Is there a way to workaround this limitation?