Files
paseo/packages/desktop/scripts/linux-sandbox/index.js
T
Mohamed Boudra fb6ecb24f0 fix(desktop): preserve Linux sandboxing wherever the host allows it
Chromium checks its Linux sandbox before main.js, while package installation probes run as root and miss AppArmor restrictions on desktop users. Choose the launch flags before exec and always install the SUID alternative for native packages. Test published artifacts as an ordinary user with namespaces both denied and allowed; never repair permissions in the smoke harness.
2026-09-07 20:49:24 +02:00

13 lines
476 B
JavaScript

const fs = require("node:fs");
const path = require("node:path");
// Keep one pre-Chromium entrypoint for AppRun, desktop entries, updates, and tarballs.
exports.installLinuxLauncher = function installLinuxLauncher(appOutDir) {
const launcher = path.join(appOutDir, "Paseo");
if (!fs.existsSync(`${launcher}.bin`)) {
fs.renameSync(launcher, `${launcher}.bin`);
}
fs.copyFileSync(path.join(__dirname, "launcher.sh"), launcher);
fs.chmodSync(launcher, 0o755);
};