Repository navigation
fix(linux): launch the AppImage terminal daemon through its own mount - #27435
Conversation
In an AppImage the daemon ran from the window's FUSE mount, which the runtime unmounts when the window exits or the session ends; the surviving daemon then SIGBUSed on its next cold page and took every terminal with it. Launch it through $APPIMAGE instead so it gets its own runtime and mount, scoped with the daemon, falling back to the in-mount launch on failure. Part of #18200 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each AppImage launch mounts at a fresh random dir, so a daemon that now survives its window recorded an entry path the next window could never match, and an idle survivor was replaced as 'different app path'. Record and compare $APPIMAGE plus the in-image entry path instead; a new release at the same path is still caught by the app-version check. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The cleanup-failure veto now applies only to the AppImage attempt, so a .deb/.rpm/tarball scoped launch whose cleanup fails still retries unscoped exactly as before. Co-authored-by: Sergey Tiron <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to No actionable issue was found that should prevent merging. The packaged AppImage launch should still receive its normal build and startup checks. Pre-merge checks |
|
Copy of #23457 by @sergeytiron, brought up to date with
mainplus one small fix so it can land without more work from the author. Every original commit is kept with its authorship. Thank you, Sergey.ELI5
On Linux, the AppImage runs Orca out of a temporary mounted folder that disappears when the Orca window quits. The terminal background service (the daemon) is meant to keep running after the window closes, but it was started from that same folder. Once the folder went away, the daemon crashed the next time it needed code it had not loaded yet, and every open terminal went with it. Now the daemon is started through the AppImage file itself, so it gets its own folder, which lasts as long as the daemon does.
What Changed
$APPIMAGEitself. A short bootstrap finds the daemon entry inside the new mount and refuses to run if the file at$APPIMAGEis now a different release. If that launch fails for any reason, Orca falls back to today's launch from the current mount, so a broken AppImage start never costs the daemon.$APPIMAGEplus the entry path), so the next window can adopt a surviving daemon even though every launch mounts at a new random folder.APPIMAGE_EXTRACT_AND_RUN=1/--appimage-extract-and-run), deb, rpm, tarball, macOS and Windows do not meet the "validated AppImage on its own FUSE mount" check and keep today's launch unchanged.Why
Electron always starts helpers from the executable's folder, so the daemon cannot simply be moved out of the mount. Starting it through the AppImage gives it its own runtime and mount, created inside the daemon's own scope. Copying the app elsewhere first would cost about 500 MB per release and is a larger follow-up.
Linked Issue
Part of #18200 (terminal loss after the window closes). Likely prevents #23648, which stays open for its separate session-classification ask.
Visual Proof
N/A: no UI change.
Testing
The author tested real hosts (Ubuntu 20.04 and 26.04): see fix(linux): launch the AppImage terminal daemon through its own mount #23457.
Focused unit tests,
pnpm tc,oxlint,pnpm run check:code-quality:changedandpnpm lintpass locally on this branch.CI's Linux package job builds the AppImage and runs the extract-and-run serve and desktop-startup cases and the no-FUSE CLI cases in containers.
Automated tests added/updated
Review
P0/P1 review by a second model flagged the non-AppImage retry change; fixed in the last commit.
Agent skill upstream boundary
Notes
Only the Linux AppImage path changes. SSH: the daemon is local, so remote work is unaffected.
Supersedes #23457.