[codex] Sync embedded computer-use-linux v0.2.6 - #424
Merged
Conversation
Port the upstream computer-use-linux v0.2.6 screenshot fix into the embedded copy. Screenshots failed from background processes (systemd user services, non-interactive parent shells) on GNOME Wayland: the GNOME Shell DBus method rejects callers without an allowlisted bus name, and the XDG portal cancels non-interactive requests when there is no foreground window. Adds `gnome-screenshot` as a third capture fallback (GNOME Shell -> portal -> gnome-screenshot), spawned via tokio::process and bounded by a 20s timeout so a hung capture degrades to a clear error. `doctor` now probes gnome-screenshot and lists it under capabilities.screenshot when present. The backend-force env var keeps the embedded Codex naming: CODEX_COMPUTER_USE_SCREENSHOT_BACKEND (gnome-shell | portal | gnome-screenshot). Bumps the embedded crate to 0.2.6-linux-alpha1 to match upstream's 0.2.6 enumeration. Enables the tokio "process" feature. The upstream mimalloc / release-profile change is intentionally NOT ported — switching the global allocator is a workspace-wide decision for this repo's maintainer to make.
ilysenko
approved these changes
Jun 6, 2026
ilysenko
left a comment
Owner
There was a problem hiding this comment.
Reviewed current head. The screenshot fallback chain remains fail-soft, gnome-screenshot is only a final fallback or explicit override, diagnostics/tests are aligned, and local cargo test/fmt/clippy passed.
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.
Summary
codex-computer-use-linuxto the standalonecomputer-use-linuxv0.2.6 screenshot fix.gnome-screenshotas a third capture fallback (chain: GNOME Shell → portal → gnome-screenshot) for background / systemd contexts where the DBus paths are denied.0.2.6-linux-alpha1.Why
The
screenshottool failed from background processes (systemd user services, non-interactive parent shells) on GNOME Wayland. Both existing backends are structurally unavailable there:org.gnome.Shell.Screenshotrejects callers that don't own an allowlisted bus name (DBusSenderChecker) →ACCESS_DENIED.gnome-screenshotclaims an allowlisted bus name and works regardless of session context, so it's the final fallback. Spawned viatokio::processand bounded by a 20s timeout, so a hung capture degrades to a clear error instead of blocking the tool.Changes
gnome-screenshotfallback incapture_screenshot_raw(3-rung chain).CODEX_COMPUTER_USE_SCREENSHOT_BACKENDenv var to force a single backend (gnome-shell|portal|gnome-screenshot), skipping the chain — keeps the embedded Codex naming convention.doctorprobesgnome-screenshotand lists it undercapabilities.screenshotwhen present.processfeature.Not included
The upstream mimalloc / release-profile change is intentionally not ported — switching the global allocator is a workspace-wide decision for this repo's maintainer, not something to fold in via a screenshot sync.
Test
cargo test -p codex-computer-use-linux→ 111 pass (incl. backend-parse + env-override tests); clippy + fmt clean.source: gnome-screenshotcapture.Upstream reference: agent-sh/computer-use-linux v0.2.6 (fixes the background-screenshot issue reported against GNOME Wayland).