Repository navigation
fix(electron): don't write a second Linux launcher for the AppImage - #7140
Closed
github-actions[bot] wants to merge 1 commit into
Closed
github-actions[bot] wants to merge 1 commit into
github-actions[bot] wants to merge 1 commit into
Conversation
An AppImage launch now looks for another entry in the user's applications folder whose Exec= or TryExec= runs this AppImage (directly or through a symlink), as AppImageLauncher, Gear Lever or a hand-made launcher write. When one exists GAIA writes no launcher of its own and removes the one it wrote earlier, so the app grid shows GAIA once. Entries GAIA did not write are never touched. Closes #7139
4 of 5 tasks
Contributor
huong8373tt-beep
pushed a commit
to huong8373tt-beep/gaia
that referenced
this pull request
Nov 11, 2026
…land (amd#7149) On Fedora, GAIA showed up twice in the app grid and in Gear Lever, and a reinstall never fixed it: Gear Lever had already added the AppImage, and since rc15 GAIA wrote a second launcher next to it on every launch. GAIA now keeps the manager's entry and removes the duplicate it wrote. The same Fedora run found a second fault: run as an AppImage on Wayland, GAIA started with no window at all, and launching it a second time was the only thing that showed it. The window now opens on the first launch. Both faults were reproduced and the fix checked on Fedora 44 with GNOME Shell 50, the real Gear Lever and the rc16 AppImage (Fedora under WSL, GNOME Shell in its devkit window). Not yet run on a bare-metal Fedora desktop, so the missing window could be specific to that graphics stack; the fallback costs nothing where the window already paints. Closes amd#7139 Refs amd#7138 Supersedes amd#7140 (its commit is included). ## Test plan - [x] `cd tests/electron && npx jest` on Fedora 44: 62 suites pass - [x] Fedora 44 + Gear Lever, rc16 AppImage: two launchers (`gaia.desktop`, `gaia-desktop.desktop`), Gear Lever lists GAIA twice, no window in GNOME after 90 s - [x] Same setup, rc16 with this change packed into an AppImage: one launcher left, Gear Lever lists GAIA once, GNOME ties the window to Gear Lever's entry, the window opens on first launch (2 of 2 runs; rc16 0 of 5) - [x] ✕ on GNOME with no tray extension: the window minimizes and GAIA keeps running - [ ] Bare-metal Fedora Workstation with Gear Lever: launch the next RC once; GAIA is listed once and its window opens <details> <summary>🔍 Technical details</summary> - Gear Lever writes `Exec=env DESKTOPINTEGRATION=1 <path> --no-sandbox %U` with `TryExec=<path>`, so the match comes from `TryExec=`. A test pins that exact entry. - Gear Lever lists any entry in `~/.local/share/applications` whose `TryExec=` is a file in its AppImages folder, which is why GAIA's own entry appeared there with no version. - `services/window-reveal.cjs`: `revealWhenReady()` runs on `ready-to-show`, or one second after `did-finish-load` when that event hasn't fired. In the failing case `did-finish-load` fires and `ready-to-show` never does. The same files run unpacked do fire `ready-to-show`; why the mounted AppImage differs is not pinned down. - Three of the launcher tests from amd#7140 fail on a Windows host (symlink rights, backslash paths); they pass on Linux, which is what CI runs. </details> --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Kalin Ovtcharov <[email protected]>
Collaborator
|
Closing as a duplicate of #7149, which merged with this commit included and also skips other launchers it can't read. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After updating to v0.26.0-rc15, a Fedora tester saw GAIA twice in the app grid: the AppImage wrote its own launcher next to one an AppImage tool (or the user) had already made. Now, before writing, GAIA looks for another launcher that runs the same AppImage. If it finds one, it writes nothing and removes the duplicate it wrote earlier, so the grid shows one GAIA with no manual cleanup. It never touches a launcher it didn't write.
Closes #7139
Test plan
cd tests/electron && npx jestpasses (61 suites, including 5 new launcher cases)python util/lint.py --allpasses. It currently fails on mypy, import-validation and tool-description errors in Python files this PR doesn't touch.python -m pytest tests/unit/ -x. Not run here because the runner had no pytest, and this PR changes no Python.gaia-desktop.desktopfrom rc15: launch the new build.ls ~/.local/share/applications | grep -i gaiashould show only the tool's entry, and the grid should show GAIA once.gaia-desktop.desktopshould still be written, and the window should show GAIA's name and icon.🔍 Technical details
installAppImageLauncher()inservices/appimage-launcher.cjschecked only forgaia-desktop.desktop. The newotherLauncherFor()scans$XDG_DATA_HOME/applications/*.desktop. It skips GAIA's own file and any entry markedX-GAIA-AppImage=true, and it matches an entry when theExec=program (quotes, escapes and%%undone) orTryExec=resolves to$APPIMAGE. Symlinks are compared byrealpath.kept-existingwith the other entry's path. It deletesgaia-desktop.desktoponly when that file carries GAIA's marker; one without the marker still returnskept-existingearlier, as before. The icon is left in place.StartupWMClassorNamewould suppress GAIA's launcher in favour of an entry that may no longer launch anything. The tester'slsoutput would show whether that case happens.