diff --git a/apps/server/src/process/externalLauncher.test.ts b/apps/server/src/process/externalLauncher.test.ts index 4f6cabb783be9..97c8fe2810d27 100644 --- a/apps/server/src/process/externalLauncher.test.ts +++ b/apps/server/src/process/externalLauncher.test.ts @@ -274,6 +274,7 @@ it.effect.skipIf(windowsHost)( "HOME=/home/user", "WAYLAND_DISPLAY=wayland-1", "XAUTHORITY=/home/user/auth files/cookie", + "XDG_SESSION_TYPE=wayland", ], }), }), @@ -283,6 +284,8 @@ it.effect.skipIf(windowsHost)( WAYLAND_DISPLAY: "wayland-1", // Raw, not the $'...' quoting `systemctl show-environment` would print. XAUTHORITY: "/home/user/auth files/cookie", + // Electron editors pick X11 over Wayland without it, and render at the wrong scale. + XDG_SESSION_TYPE: "wayland", }, ); assert.deepEqual(yield* launchEnv({ stdout: "invalid JSON" }), { PATH: binDir }); diff --git a/apps/server/src/process/externalLauncher.ts b/apps/server/src/process/externalLauncher.ts index bb38a9d56afd4..5030694756c53 100644 --- a/apps/server/src/process/externalLauncher.ts +++ b/apps/server/src/process/externalLauncher.ts @@ -752,6 +752,7 @@ const GRAPHICAL_SESSION_ENV_KEYS: ReadonlySet = new Set([ "DISPLAY", "WAYLAND_DISPLAY", "XAUTHORITY", + "XDG_SESSION_TYPE", ]); // The user manager's environment over D-Bus. `systemctl show-environment` would