Repository navigation
fix(linux): stop Orca-managed terminals from launching the GNOME Orca screen reader via bare orca - #8347
Conversation
…reader via bare `orca` On Linux the CLI installs as orca-ide so it never shadows /usr/bin/orca (GNOME's screen reader), but agent-facing surfaces (orca-cli skill, dispatch preambles, CLI hints) all invoke bare `orca` — so on stock Ubuntu an agent inside an Orca terminal launched the screen reader, which started speaking (#7904). Fix: prepend a userData-scoped shim dir (bare `orca` -> bundled orca-ide launcher, or the stable AppImage) to the PATH of every packaged-Linux managed PTY, mirroring the existing dev-mode cli/bin prepend. The user's own shells — and their real screen reader command — stay untouched. Also flip the orca-cli skill probe to prefer orca-ide so agents outside Orca terminals never execute the screen reader. Fixes #7904 Co-authored-by: Orca <help@stably.ai>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughAdds a reusable bare- 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…reader via bare `orca` (stablyai#8347) On Linux the CLI installs as orca-ide so it never shadows /usr/bin/orca (GNOME's screen reader), but agent-facing surfaces (orca-cli skill, dispatch preambles, CLI hints) all invoke bare `orca` — so on stock Ubuntu an agent inside an Orca terminal launched the screen reader, which started speaking (stablyai#7904). Fix: prepend a userData-scoped shim dir (bare `orca` -> bundled orca-ide launcher, or the stable AppImage) to the PATH of every packaged-Linux managed PTY, mirroring the existing dev-mode cli/bin prepend. The user's own shells — and their real screen reader command — stay untouched. Also flip the orca-cli skill probe to prefer orca-ide so agents outside Orca terminals never execute the screen reader. Fixes stablyai#7904 Co-authored-by: Orca <help@stably.ai>
Fixes #7904
Problem
On stock Ubuntu GNOME,
/usr/bin/orcais the GNOME screen reader. The Linux CLI already installs asorca-ideprecisely to avoid shadowing it (since v1.4.36) — but every agent-facing surface still tells agents to run bareorca:orca-cliskill (command -v orca || command -v orca-ide, thenorca status --json, …)src/main/runtime/orchestration/preamble.tsusesorcain prod)orca linear …,orca terminal focus …)So an agent inside an Orca-managed terminal on Ubuntu resolves
orcato/usr/bin/orcaand starts the screen reader, which begins speaking — exactly what the reporter hit ("launching Orca / using the orca MCP starts the GNOME Orca screen reader").Fix
Scope a bare-
orcashim to Orca-managed PTYs only, instead of touching the user's shells:src/main/cli/linux-terminal-orca-cli-shim.ts(new) — writes<userData>/linux-orca-cli-shim/orca, a script that execs the bundledorca-idelauncher (or the stable$APPIMAGEwrapper when running from an AppImage). Memoized per userData path; failures are not cached; exec bit re-asserted for stale shims.src/main/ipc/pty.ts— on packaged Linux,buildPtyHostEnvprepends that dir to the PTY PATH, mirroring the existing dev-modecli/binprepend, and covering both spawn paths (local provider + daemon) by construction.src/main/cli/linux-bare-orca-dispatcher.ts— extracted the script builder (buildBareOrcaCliScript) so the existingorca serve~/.local/bindispatcher and the new PTY shim share one implementation; dispatcher marker behavior unchanged.skills/orca-cli/SKILL.md— probe flipped tocommand -v orca-ide || command -v orcawith a warning, so agents running outside Orca terminals on Linux never execute the screen reader while probing; header now states thatorcais always safe inside Orca-managed terminals.This deliberately does not install a global bare
orcaon desktop Linux (the reporter's own workaround): shadowing/usr/bin/orcaaccount-wide would break the screen reader command for accessibility users. The shim is visible only on Orca-managed PTY PATHs.Testing
pty.test.tscase: packaged Linux spawn gets the shim dir ahead of/usr/binon PATH.src/main/ipc/pty.test.ts(284) andsrc/main/cli/(63) suites pass; typecheck clean. (pnpm lintfails on main for an unrelated localization-catalog key inUsagePercentageDisplayChangeNotice.tsx; changed files are oxlint/oxfmt clean.)orca status --jsonto the bundled launcher.Runtime behavior is packaged-Linux-only, so it cannot be exercised in a macOS dev Electron; verified via the unit suites + PATH simulation above.
Known remaining gaps (pre-existing, not addressed here)
orca-ideand WSL PTYs (Windows host) don't get this shim, so bare-orcapreamble commands are command-not-found there (no screen-reader risk).PATHcan drop the prepend — same exposure as the existing dev-mode CLI prepend.Made with Orca 🐋