feat(appimage): If necessary, start with --no-sandbox.
#158
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix electron-userland/electron-builder#8440
The method in electron-userland/electron-builder#4496 has the following drawbacks:
The AppImage can be launched without desktop integration.
It also doesn't work when started from the command line.
user namespace should now be available on many Linux systems.
This means that
--no-sandboxis only needed in limited environments.Even in Ubuntu 24.04 or later, starting from file manager bypasses AppArmor restrictions, so
--no-sandboxis not required.https://discourse.ubuntu.com/t/understanding-apparmor-user-namespace-restriction/58007#p-148026-bypassing-apparmor-security-restriction
It's also possible that the user has disabled AppArmor.
This solves these problems by automatically detecting when the user namespace is unavailable and adding
--no-sandboxat runtime.