From 80db8c759543de0624f09f91019e51da51f5c3ba Mon Sep 17 00:00:00 2001 From: Shriram Vasudevan <72285290+Shriram-Vasudevan@users.noreply.github.com> Date: Tue, 12 May 2026 00:39:58 -0400 Subject: [PATCH] Apply Linux no-sandbox launch flag --- package.json | 3 +++ src/electron/index.ts | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/package.json b/package.json index ff99534998..5c3e72953a 100644 --- a/package.json +++ b/package.json @@ -273,6 +273,9 @@ }, "linux": { "icon": "static/icon.icns", + "executableArgs": [ + "--no-sandbox" + ], "target": [ "deb", "rpm", diff --git a/src/electron/index.ts b/src/electron/index.ts index 2ce3a5f907..b97577553f 100644 --- a/src/electron/index.ts +++ b/src/electron/index.ts @@ -15,8 +15,15 @@ function applyMenuTemplate(template: MenuItemConstructorOptions[]) { } const mac = process.platform === 'darwin' +const linux = process.platform === 'linux' let ready = false +if (linux && app.isPackaged && !process.argv.includes('--no-sandbox')) { + // Debian-based systems can abort before opening a window when the packaged + // chrome-sandbox helper is not installed with setuid permissions. + app.commandLine.appendSwitch('no-sandbox') +} + const singleInstance = app.requestSingleInstanceLock() if (!singleInstance) { app.quit()