From 1690cf90910375deafbd9d80651fae577ac0262c Mon Sep 17 00:00:00 2001 From: Zane <75694352+zanesq@users.noreply.github.com> Date: Mon, 6 Oct 2025 16:57:10 -0700 Subject: [PATCH] Fix linux deeplinks not working (#5041) --- ui/desktop/src/main.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/desktop/src/main.ts b/ui/desktop/src/main.ts index b9a18f59bd..cbc65bafb4 100644 --- a/ui/desktop/src/main.ts +++ b/ui/desktop/src/main.ts @@ -174,9 +174,10 @@ if (MAIN_WINDOW_VITE_DEV_SERVER_URL) { app.setAsDefaultProtocolClient('goose'); } -// Only apply single instance lock on Windows where it's needed for deep links +// Apply single instance lock on Windows and Linux where it's needed for deep links +// macOS uses the 'open-url' event instead let gotTheLock = true; -if (process.platform === 'win32') { +if (process.platform !== 'darwin') { gotTheLock = app.requestSingleInstanceLock(); if (!gotTheLock) { @@ -226,7 +227,7 @@ if (process.platform === 'win32') { }); } - // Handle protocol URLs on Windows startup + // Handle protocol URLs on Windows and Linux startup const protocolUrl = process.argv.find((arg) => arg.startsWith('goose://')); if (protocolUrl) { app.whenReady().then(() => {