Commit d106884
fix(launcher): installed web apps launch through TronBrowser, not the raw engine
Installing a web app writes a freedesktop shortcut, and the engine writes it
against ITSELF -- `Exec=` is the Chromium binary plus `--app-id=`. That is the
one launch path in TronBrowser that never comes through launcher/tronbrowser,
so an app started from its desktop icon gets none of what the launcher sets up:
no bundled extensions, no --class, and no GPU mode. Under the Flathub engine the
recorded path is the in-sandbox /app/... one, which does not exist on the host
at all, so the icon cannot launch anything.
That is why "install app" from the address bar works and the same app dies from
its icon: the address bar hands the request to a browser the launcher already
configured, while the icon starts a fresh one it never touched.
launcher/tron-pwa repoints those shortcuts at the launcher, keeping every
Chromium switch they carried -- the app id, the profile, the user data dir and
the shortcuts-menu switches -- so each icon still opens the app it named, in the
profile it was installed in. It hands back the shortcut's own StartupWMClass as
--class, because the launcher stamps --class=TronBrowser on everything it starts
and a window whose class does not match never binds to its taskbar entry.
The shim runs it on every start rather than once at install: the engine rewrites
these files whenever an app's manifest or icon changes, which puts the engine
path straight back. `tron pwa` is the manual handle and `tron pwa list` the
diagnostic; `tron remove` reverts, so uninstalling does not strand every icon on
a launcher that is about to be deleted.
Only shortcuts whose --user-data-dir is a TronBrowser profile are touched. A
real Chrome's web apps are left byte-identical.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SZXtxiVkXd7rFmvrMYV7Ut1 parent 810409a commit d106884
5 files changed
Lines changed: 899 additions & 0 deletions
File tree
- apps
- desktop
- launcher
- scripts
- test
- web/public
0 commit comments