Linux: Neustart mit --ozone-platform=x11 statt appendSwitch (GPU-Prozess stürzte ab, kein Fenster im installierten Paket)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-25 16:44:12 +02:00
co-authored by Claude Opus 5.5
parent 6222a3ba6e
commit 4b1738aae8
+6 -1
View File
@@ -17,7 +17,12 @@ const store = new Store();
// Die Wahl wird unverschlüsselt in launch.json gespeichert, weil sie vor dem Start des Fensters gebraucht wird.
const launchFile = path.join(app.getPath('userData'), 'launch.json');
function readLaunch() { try { return JSON.parse(fs.readFileSync(launchFile, 'utf8')); } catch { return {}; } }
if (process.platform === 'linux' && readLaunch().x11 !== false) app.commandLine.appendSwitch('ozone-platform', 'x11');
// appendSwitch kommt für ozone-platform zu spät (Browser läuft schon unter Wayland, GPU-Prozess stürzt ab),
// daher einmalig mit dem Schalter auf der Kommandozeile neu starten.
if (process.platform === 'linux' && readLaunch().x11 !== false && !process.argv.some(a => a.startsWith('--ozone-platform'))) {
app.relaunch({ args: process.argv.slice(1).concat('--ozone-platform=x11') });
app.exit(0);
}
const pendingSecrets = new Map();
function send(channel, ...args) {