fix(gnome): indicator "Preferences" opened nothing (Flatpak binary off host PATH)#57
Merged
Merged
Conversation
…f host PATH)
The Shell indicator runs host-side but launched the preferences panel with a
bare `lnxdrive-preferences` commandline. That binary ships only inside the
Flatpak sandbox (/app/bin), so it is not on the host $PATH — the launch
failed silently ("not found in $PATH") and nothing opened. Same broken
pattern in 4 sites: the Preferences item, two `--page conflicts` deep-links
in menuItems.js, and the "Open" button in prefs.js.
Add a shared Gio-only launcher.js exposing launchPreferences(page). It
resolves the exported desktop entry
(com.strangedaystech.LNXDrive.Preferences.desktop), whose Exec wraps
`flatpak run …`, and launches through it — rebuilding the commandline to
append `--page <page>` when a deep-link needs it. Falls back to the bare
commandline for native/dev installs where the binary is on $PATH. Wire all
4 call sites to it and install launcher.js via meson.
Verified: DesktopAppInfo resolves the entry from the host; `gtk-launch`
starts lnxdrive-preferences inside the sandbox (window opens); node --check
clean on all touched files.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Síntoma
Al abrir el menú del indicador del panel y hacer clic en Preferences, no se abría nada.
Causa raíz
La extensión de Shell corre host-side (en
gnome-shell), pero lanzaba el panel con un comando pelónlnxdrive-preferences, que no está en el PATH del host — el binario se shipea solo dentro del sandbox del Flatpak (/app/bin). El journal lo confirmó:Mismo patrón roto en 4 sitios: el ítem Preferences, dos deep-links a conflicts (
--page conflicts) enmenuItems.js, y el botón "Open" enprefs.js.Fix
Nuevo módulo compartido
launcher.js(solo-Gio, importable desde el contexto Shell y el de prefs) conlaunchPreferences(page):.desktopexportado (com.strangedaystech.LNXDrive.Preferences.desktop), cuyoExecya envuelveflatpak run …, y lanza por ahí.Execy añade--page <page>(opción real de GApplication del panel —app.rs:74).Los 4 sitios ahora llaman al helper;
launcher.jsse instala vía meson.Verificación
Gio.DesktopAppInfo.new(...)resuelve el.desktopdesde el host (probado congjs); comando reconstruido con--page conflictscorrecto.gtk-launch com.strangedaystech.LNXDrive.Preferences→ arrancalnxdrive-preferencesen el sandbox (ventana abre).node --checklimpio en los 3 archivos +launcher.js.meson installincluyelauncher.js;straymark validate0 errores.Nota
Gio.DesktopAppInfo(noGioUnix.DesktopAppInfo) a propósito:GioUnixno existía en GNOME 45/46; la extensión declara compat 45–50. El warning de deprecación en GNOME 50 es benigno.Documentado en
AILOG-2026-07-03-004. La copia instalada del operador ya se actualizó para prueba tras recargar sesión.🤖 Generated with Claude Code