fix(desktop): match VS Code Linux sandbox handling, scope --no-sandbox to AppImage
The Linux wrapper renamed the executable to Paseo.bin and exec'd it with --no-sandbox, which surfaced as Paseo.bin in the dock and process list on Ubuntu. Drop the wrapper and the chrome-sandbox deletion entirely. .deb/.rpm now ship chrome-sandbox SUID 4755 (electron-builder 26 default postinst, matches VS Code) and run Paseo directly with the Chromium sandbox on. AppImage cannot carry SUID, so --no-sandbox is now injected at runtime only when process.env.APPIMAGE is set. Fixes #602 Re #381
This commit is contained in:
@@ -86,6 +86,13 @@ if (forcedUserDataDir) {
|
||||
}
|
||||
}
|
||||
|
||||
// AppImage runtimes mount the app from /tmp under the user's UID, so the SUID
|
||||
// chrome-sandbox helper we ship in .deb/.rpm cannot work there. Disable the
|
||||
// sandbox only in that case; .deb/.rpm keep the sandbox on, matching VS Code.
|
||||
if (process.platform === "linux" && process.env.APPIMAGE) {
|
||||
app.commandLine.appendSwitch("no-sandbox");
|
||||
}
|
||||
|
||||
// Allow users to pass Chromium flags via PASEO_ELECTRON_FLAGS for debugging
|
||||
// rendering issues (e.g. "--disable-gpu --ozone-platform=x11").
|
||||
// Must run before app.whenReady().
|
||||
|
||||
Reference in New Issue
Block a user