diff --git a/app/src/main-process/main.ts b/app/src/main-process/main.ts index 00c852e19c9..b41b101f22d 100644 --- a/app/src/main-process/main.ts +++ b/app/src/main-process/main.ts @@ -261,6 +261,16 @@ function handlePossibleProtocolLauncherArgs(args: ReadonlyArray) { } else { log.error(`Malformed launch arguments received: ${args}`) } + } else if (__LINUX__) { + // we expect this call to have several parameters before the URL we want, + // so we should filter out the program name as well as any parameters that + // look like arguments to Electron + const argsWithoutParameters = args.filter( + a => !a.endsWith('github-desktop') && !a.startsWith('--') + ) + if (argsWithoutParameters.length > 0) { + handleAppURL(argsWithoutParameters[0]) + } } else if (args.length > 1) { handleAppURL(args[1]) }