Skip to content

fix(gnome): indicator "Preferences" opened nothing (Flatpak binary off host PATH)#57

Merged
montfort merged 2 commits into
mainfrom
fix/shell-indicator-preferences-launch
Jul 4, 2026
Merged

fix(gnome): indicator "Preferences" opened nothing (Flatpak binary off host PATH)#57
montfort merged 2 commits into
mainfrom
fix/shell-indicator-preferences-launch

Conversation

@montfort

@montfort montfort commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

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ón lnxdrive-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ó:

[LNXDrive] Failed to launch preferences: Programa «lnxdrive-preferences» no encontrado en $PATH

Mismo patrón roto en 4 sitios: el ítem Preferences, dos deep-links a conflicts (--page conflicts) en menuItems.js, y el botón "Open" en prefs.js.

Fix

Nuevo módulo compartido launcher.js (solo-Gio, importable desde el contexto Shell y el de prefs) con launchPreferences(page):

  • Resuelve el .desktop exportado (com.strangedaystech.LNXDrive.Preferences.desktop), cuyo Exec ya envuelve flatpak run …, y lanza por ahí.
  • Para deep-links, reconstruye el comando desde el Exec y añade --page <page> (opción real de GApplication del panel — app.rs:74).
  • Fallback al comando pelón para instalaciones nativas/dev donde el binario sí está en el PATH.

Los 4 sitios ahora llaman al helper; launcher.js se instala vía meson.

Verificación

  • Gio.DesktopAppInfo.new(...) resuelve el .desktop desde el host (probado con gjs); comando reconstruido con --page conflicts correcto.
  • gtk-launch com.strangedaystech.LNXDrive.Preferences → arranca lnxdrive-preferences en el sandbox (ventana abre).
  • node --check limpio en los 3 archivos + launcher.js.
  • meson install incluye launcher.js; straymark validate 0 errores.

Nota

Gio.DesktopAppInfo (no GioUnix.DesktopAppInfo) a propósito: GioUnix no 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

montfort and others added 2 commits July 3, 2026 18:59
…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>
@montfort montfort merged commit 45edc05 into main Jul 4, 2026
5 checks passed
@montfort montfort deleted the fix/shell-indicator-preferences-launch branch July 4, 2026 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant