From a1bba6f8d3252e7baffa99cf33be13a1a6319d99 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 6 May 2025 13:24:49 +0100 Subject: [PATCH] Apply workaround to fix app launching on Linux Manual backport of https://github.com/element-hq/element-desktop/pull/2307 --- src/electron-main.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/electron-main.ts b/src/electron-main.ts index fddee60..5d9e888 100644 --- a/src/electron-main.ts +++ b/src/electron-main.ts @@ -326,6 +326,11 @@ app.commandLine.appendSwitch("--enable-usermedia-screen-capturing"); if (!app.commandLine.hasSwitch("enable-features")) { app.commandLine.appendSwitch("enable-features", "WebRTCPipeWireCapturer"); } +// Workaround bug in electron 36:https://github.com/electron/electron/issues/46538 +// Hopefully this will no longer be needed soon and can be removed +if (process.platform === "linux") { + app.commandLine.appendSwitch("gtk-version", "3"); +} const gotLock = app.requestSingleInstanceLock(); if (!gotLock) {