diff --git a/apps/desktop/src/main.ts b/apps/desktop/src/main.ts index a0c9c4692b8d84d81c18523ed6afd8ac0c6843c6..a1f7a9bf21349271a570135693c45bae2b90d7e2 100644 --- a/apps/desktop/src/main.ts +++ b/apps/desktop/src/main.ts @@ -83,7 +83,12 @@ function startBackend(): void { const child = spawn(process.execPath, [BACKEND_ENTRY], { cwd: ROOT_DIR, - env: backendEnv(), + // In Electron main, process.execPath points to the Electron binary. + // Run the child in Node mode so this backend process does not become a GUI app instance. + env: { + ...backendEnv(), + ELECTRON_RUN_AS_NODE: "1", + }, stdio: "inherit", }); backendProcess = child;