File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,15 @@ app.commandLine.appendSwitch('disable-color-correct-rendering'); // Prevents inc
2727app . commandLine . appendSwitch ( 'autoplay-policy' , 'no-user-gesture-required' ) ; // Prevents requiring user interaction to play audio
2828app . commandLine . appendSwitch ( 'disable-http-cache' ) ; // Disables clearing of the cache folder at each startup
2929
30+ // Electron v31+ prefers Wayland on Linux (via Ozone), but it's unavailable in Snap sandboxes.
31+ // This causes "Failed to connect to Wayland display: No such file or directory" at startup.
32+ // Fall back to X11 if Wayland is not the active session:
33+ const useWayland : boolean = process . env . XDG_SESSION_TYPE === 'wayland' ;
34+
35+ if ( ! useWayland ) {
36+ app . commandLine . appendSwitch ( 'ozone-platform' , 'x11' ) ;
37+ }
38+
3039/**
3140 * Settings
3241 */
You can’t perform that action at this time.
0 commit comments