-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to run and/or install AppImage on Ubuntu #8440
Comments
This is what I get when I run with sudo:
|
It's an issue with a security setting in Ubuntu 24.04 that affects pretty much all electron apps. See more details here: https://ubuntu.com/blog/ubuntu-23-10-restricted-unprivileged-user-namespaces |
I was able to install and run the .deb package on Ubuntu with apt install ./app.deb. It ran fine. I'll do more testing. But, I guess this limits me to only Debian and Ubuntu? As I learn more, I'll post again. Thanks for the link |
When installing the deb which needs root, the chrome-sandbox is suid root, so it doesn't have that problem. |
This is really an Electron issue, but the maintainers haven't shown any interest in even commenting on it: electron/electron#42510 @mmaietta I wonder if you have any thoughts on how this might be approached? Is there anything we could do at build time? Otherwise, any thoughts on how a script might help to resolve this? The core problem is that even if you want to make an exception for a single AppImage in a safe way, the way they're mounted to the filesystem at random paths seemingly makes that impossible. |
GitHub runners now use Ubuntu 24.04, which introduces two issues affecting Electron application runtime checks: 1. AppArmor restrictions on unprivileged user namespaces 2. Outdated Mesa drivers This commit resolves both with workarounds. Changes: - Disable AppArmor restrictions on unprivileged user namespaces: - Resolves the following error: ``` [5475:1011/121711.489417:FATAL:setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /tmp/.mount_privacv1kcOj/chrome-sandbox is owned by root and has mode 4755. ``` - Related key Electron issues: - electron/electron#41066 - electron/electron#42510 - electron-userland/electron-builder#8440 - Update Mesa drivers - Fixes following errors: ``` MESA: error: ZINK: failed to choose pdev glx: failed to create drisw screen ``` - Installs latest Mesa drivers from Kisak PPA
The problem is not in Electron itself, but apparmor in Ubuntu 24, see https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/2046844 Update: Proper solution is to add AppArmor profile, see #8635 Workaround is either to switch off
but it works untilt reboot only. To switch it off permanently see electron/electron#41066 (comment) Or set SUID
The older older electron-builder set SUID always, however with electron-builder 25.1.8 I have a deb with
See also #8368 and templates/linux/after-install.tpl And it does not set SUID on Ubuntu 24. Although the problem seems to be in Ubuntu 24, I would like to have some setting to switch of to the old electron-builder behaviour and set SUID always, so as the installation is reliable until Ubuntu 24 is fixed. |
@xmedeko you could copy-paste the |
My versions:
"electron": "^31.0.2",
"electron-builder": "^24.13.3",
"electron-vite": "^2.3.0",
Node version:
v18.19.1
Target:
Linux x64
ISSUE
When I run the AppImage (Ubuntu 24.04 KDE Plasma 5.27) I get the following error. I gave my user account rwx persmissions to the "appForLinux.AppImage" file.
[30783:0831/200557.279232:FATAL:setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /tmp/.mount_deskto9XlUHg/chrome-sandbox is owned by root and has mode 4755.
Trace/breakpoint trap (core dumped)
Is this an error with my (limited) understanding of how to run an AppImage on Ubuntu or does this error indicate the packaging is bad/corrupt with Electron Builder?
I'm more of a Windows/Mac developer. Should I install the Snap or .deb version of the test app built I with Electron Builder? I thought it was straightforward to just run any AppImage on Ubuntu. But, maybe I should install the electron app some other way? If so, what would that command look like to install a Linux app built with Electron Builder?
I use "apt install" a lot... But, I'm new to Linux dev so I'm not sure what my other options are to test an Electron app on Linux. I can run the app just fine from VSCode on Ubuntu. And it works but how do I actually install it and run it?
Thanks
The text was updated successfully, but these errors were encountered: