Launcher won't update game if using Gear Lever #118

Closed
opened 2026-11-15 22:03:22 +00:00 by marsexpressmagicbean · 8 comments

Gear Lever renames AppImages when added the launcher menu. I believe this is causing the launcher to detect the game as running and won't update.

This is a known issue https://github.com/mijorus/gearlever/issues/428. In this case, the launcher appimage gets renamed to /home/user/AppImages/longshot.appimage

Gear Lever renames AppImages when added the launcher menu. I believe this is causing the launcher to detect the game as running and won't update. This is a known issue https://github.com/mijorus/gearlever/issues/428. In this case, the launcher appimage gets renamed to `/home/user/AppImages/longshot.appimage`
marsexpressmagicbean changed title from Launcher won't update if using to Launcher won't update if using Gear Lever 2026-11-15 22:18:51 +00:00
marsexpressmagicbean changed title from Launcher won't update if using Gear Lever to Launcher won't update game if using Gear Lever 2026-11-15 22:19:16 +00:00
Owner

Anything we need to do on our side?

Anything we need to do on our side?

Could the issue be that Gear Lever detects "Longshot" as the name of the app, then renames the AppImage file to longshot.appimage because that's the name of the application in the metadata, possibly in

Name=Longshot

?

image

The name of the app in Gear Lever should probably be "Longshot Launcher", the file would then be renamed to something other than "longshot" and would no longer be detected as the actual game running.

Could the issue be that Gear Lever detects "Longshot" as the name of the app, then renames the AppImage file to longshot.appimage because that's the name of the application in the metadata, possibly in https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/src/commit/bfa244864cb65adf44c86a485b1efecb557fdfe0/scripts/package.sh#L90 ? ![image](/attachments/322d7ebb-a9e4-4348-aec7-20918c8a8b4a) The name of the app in Gear Lever should probably be "Longshot Launcher", the file would then be renamed to something other than "longshot" and would no longer be detected as the actual game running.
Author

@HumanBean wrote in #118 (comment):

Anything we need to do on our side?

I imagine, change how the Longshot executable is detected, or like Krafish said rename the launcher executable, or allow the option to skip having to close the game Longshot. I don't think Gear Lever is going to change their functionality anytime soon.

@HumanBean wrote in https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/issues/118#issuecomment-30965: > Anything we need to do on our side? I imagine, change how the Longshot executable is detected, or like Krafish said rename the launcher executable, or allow the option to skip having to close the game Longshot. I don't think Gear Lever is going to change their functionality anytime soon.
Contributor

Claiming the launcher-side fix. Measured today on current main to separate what actually happens from the report's guess:

  • Confirmed root of the rename: our own AppImage metadata says the app is the game. scripts/package.sh bakes Name=Longshot into the desktop entry (StartupWMClass is longshot-launcher, but the Name is what Gear Lever keys its rename on, upstream mijorus/gearlever#428). Renaming the shipped file LongshotLauncher-<tag>-x86_64.AppImage by hand to longshot.appimage reproduces the reporter's layout.
  • Ran a renamed launcher and read /proc: the AppImage runtime's own process is separate from the launcher's (comm=longshot.appima, argv0=/path/longshot.appimage vs the launcher at comm=LongshotLaunche under the mount dir). Core/Saves.cs Running() feeds both comm and the argv0 basename of every process into RunningFrom, and excludes only the launcher's own pid (own = Environment.ProcessId) — the runtime process is not excluded.
  • The regex in RunningFrom (^(longshot|…)[-_.].*\.appimage$) flags any longshot<sep>…appimage name as the game running. Plain longshot.appimage does not match today (no middle segment), but Gear Lever's dedupe names do (longshot-2.appimage and friends from #428) — and then the launcher counts itself as the running game and refuses the update. That is the exact symptom: updates blocked with a game-is-running message while no game runs.

Fix shape: (1) Running() must drop candidates that are the launcher itself — compare against $APPIMAGE / the own exe path (SelfUpdate.CurrentFile), not just the pid — so no rename scheme can make the launcher look like the game; (2) package.sh desktop Name=Longshot → Name=Longshot Launcher, per Krafish's diagnosis, so Gear Lever and friends stop naming our launcher after the game. Regression pins in the launcher core suite for both: renamed-runtime candidates must not flag, and the package metadata must name the launcher, not the game.

Claiming the launcher-side fix. Measured today on current main to separate what actually happens from the report's guess: - Confirmed root of the rename: our own AppImage metadata says the app is the game. `scripts/package.sh` bakes `Name=Longshot` into the desktop entry (StartupWMClass is `longshot-launcher`, but the *Name* is what Gear Lever keys its rename on, upstream mijorus/gearlever#428). Renaming the shipped file `LongshotLauncher-<tag>-x86_64.AppImage` by hand to `longshot.appimage` reproduces the reporter's layout. - Ran a renamed launcher and read `/proc`: the AppImage runtime's own process is separate from the launcher's (`comm=longshot.appima`, `argv0=/path/longshot.appimage` vs the launcher at `comm=LongshotLaunche` under the mount dir). `Core/Saves.cs` `Running()` feeds both `comm` and the argv0 basename of **every** process into `RunningFrom`, and excludes only the launcher's own pid (`own = Environment.ProcessId`) — the runtime process is not excluded. - The regex in `RunningFrom` (`^(longshot|…)[-_.].*\.appimage$`) flags any `longshot<sep>…appimage` name as the game running. Plain `longshot.appimage` does not match today (no middle segment), but Gear Lever's dedupe names do (`longshot-2.appimage` and friends from #428) — and then the launcher counts **itself** as the running game and refuses the update. That is the exact symptom: updates blocked with a game-is-running message while no game runs. Fix shape: (1) `Running()` must drop candidates that are the launcher itself — compare against `$APPIMAGE` / the own exe path (`SelfUpdate.CurrentFile`), not just the pid — so no rename scheme can make the launcher look like the game; (2) `package.sh` desktop `Name=Longshot` → `Name=Longshot Launcher`, per Krafish's diagnosis, so Gear Lever and friends stop naming our launcher after the game. Regression pins in the launcher core suite for both: renamed-runtime candidates must not flag, and the package metadata must name the launcher, not the game.
Contributor

Fix is up: PR https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/NEWPR (head 836eb5d). Both halves of what made the Gear Lever rename harmful are gone: the packaged desktop entry now says Name=Longshot Launcher (so the rename names the launcher after itself, never after the game), and the running-game check skips the process whose argv[0] is the launcher's own AppImage ($APPIMAGE), which is the process Gear Lever's renamed runtime was. A tester on a Deck that already went through the rename: update through Gear Lever once and confirm the launcher updates normally.

Fix is up: PR https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/NEWPR (head 836eb5d). Both halves of what made the Gear Lever rename harmful are gone: the packaged desktop entry now says Name=Longshot Launcher (so the rename names the launcher after itself, never after the game), and the running-game check skips the process whose argv[0] is the launcher's own AppImage ($APPIMAGE), which is the process Gear Lever's renamed runtime was. A tester on a Deck that already went through the rename: update through Gear Lever once and confirm the launcher updates normally.
Contributor

Correction to the link above: the PR is #169 (head 836eb5d).

Correction to the link above: the PR is https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/169 (head 836eb5d).
Collaborator

From Discord:

Reporter on Bazzite (Linux), Ryzen 5 5600XT and Radeon RX 6650 XT reports game update remains blocked while only the launcher is open. Screenshot tooltip: “Save and close Longshot first: this replaces the game in its folder.” Update target shown: v3.0.0-rc.7. They confirmed closing Longshot / the previous suggested workaround did not help. No launcher version or logs supplied.

From [Discord](https://discord.com/channels/1569849200047427645/1572257417184551032/1572257417184551032): Reporter <name> on Bazzite (Linux), Ryzen 5 5600XT and Radeon RX 6650 XT reports game update remains blocked while only the launcher is open. Screenshot tooltip: “Save and close Longshot first: this replaces the game in its folder.” Update target shown: v3.0.0-rc.7. They confirmed closing Longshot / the previous suggested workaround did not help. No launcher version or logs supplied.

@HumanBean I think this one should be a priority: it probably hits a lot of Linux users, since Gear Lever is a common way to add AppImages on Bazzite and the Deck. Confirmed today with a Bazzite user from Discord: Gear Lever renamed the launcher to longshot.appimage_0.appimage, which matches the running-game check, so since rc.7 every game update is blocked with "Save and close Longshot first". Renaming the AppImage works around it, but most people won't find that. #169 should fix it (I left a note there about symlinked paths). It would be great to get it in ASAP.

@HumanBean I think this one should be a priority: it probably hits a lot of Linux users, since Gear Lever is a common way to add AppImages on Bazzite and the Deck. Confirmed today with a Bazzite user from [Discord](https://discord.com/channels/1569849200047427645/1572256701267185854): Gear Lever renamed the launcher to longshot.appimage_0.appimage, which matches the running-game check, so since rc.7 every game update is blocked with "Save and close Longshot first". Renaming the AppImage works around it, but most people won't find that. #169 should fix it (I left a note there about symlinked paths). It would be great to get it in ASAP.
Sign in to join this conversation.
No milestone
No project
No assignees
6 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher#118
No description provided.