Turns out that we don't need to force Chromium to use an Xorg backend: we can
disable the GPU subprocess and GPU acceleration (not a big performance hit for
Chrysalis) instead. This way we'll use the Wayland backend still.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
Unfortunately, Chromium's Wayland support is not working properly yet, and
Chrysalis fails to start under it. Force an xorg backend to avoid that.
The root cause seems to be that recent Electron requires GPU acceleration, and
Chromium under Wayland does not support that.
Fixes#813.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
When checking whether unprivileged user namespace cloning is supported by the
kernel, if the file doesn't exist, assume we don't have it, rather than erroring
out.
Fixes#724.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
This upgrades Electron to v12 (which ships with a Chromium that has initial
support for Wayland), and adjusts the AppImage launcher script so that if
wayland is detected, it will let Electron know we want to use it.
Fixes#668.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
If `/proc/sys/kernel/unprivileged_userns_clone` does not exist, do not fail and
exit immediately, but assume that the feature is not available.
This should fix the app being unable to start on Fedora32.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>
On Linux, sandboxing requires either a suid root helper (which we can't ship in
the AppImage build), running as root (which is something we'd rather avoid), or
unprivileged user namespace cloning (which is only available on more recent
kernels). Since we do not want to run as root, and we'd like users to run
Chrysalis without having to explicitly pass arguments to it, on Linux, we wrap
the launcher.
The wrapper checks for the necessary kernel feature, and disables the sandbox if
the feature is not available. This is still a better and safer experience than
running as root, or than the user having to explicitly run Chrysalis with
`--no-sandbox`.
This is only done on Linux, and only for the AppImage build. Running `yarn run
start` will still require the extra flag.
Fixes#499.
Signed-off-by: Gergely Nagy <algernon@keyboard.io>