Skip to content

Add claude-desktop, Anthropic's Linux desktop beta - #348

Merged
spencerbull merged 3 commits into
omacom:masterfrom
spencerbull:add-claude-desktop
Sep 10, 2026
Merged

spencerbull merged 3 commits into
omacom:masterfrom
spencerbull:add-claude-desktop

Conversation

@spencerbull

@spencerbull spencerbull commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Anthropic ships the Claude desktop app for Linux (beta since June) only through its own Debian repository at downloads.claude.ai/claude-desktop/apt/stable, for amd64 and arm64. This packages it the way openai-codex-desktop packages the ChatGPT desktop app: extract the deb's data.tar.xz, replace the bare /usr/bin/claude-desktop symlink with a launcher that asks Chromium for Wayland directly (same logic as chatgpt-launcher.sh, with its own claude-desktop-flags.conf), keep the vendor copyright as the license, and drop the Debian policy files. The app has no self-updater on Linux, so nothing needs disabling.

Updates come through the declarative debian upstream provider rather than a bespoke hook: Claude's versions (1.46388.2) are already valid Arch pkgvers, so the apt Packages index names the newest release and the two pool debs are hashed when one appears. release_ring is fast, like the other AI desktop apps.

Dependencies were mapped from the deb's control stanza and verified against readelf -d on the actual binary — every NEEDED soname is satisfied directly or transitively by the declared depends. Cowork (the VM-backed agent tab) needs QEMU, UEFI firmware and virtiofsd. The app probes Debian's paths for that stack — /usr/libexec/virtiofsd, and /usr/share/OVMF/OVMF_CODE_4M.fd with the VARS path derived from it — so package() ships symlinks mapping them onto Arch's /usr/lib/virtiofsd and /usr/share/edk2/x64/*.4m.fd, dangling harmlessly until the optdepends are installed. Every Cowork optdepend and shim is x86_64-only: Arch Linux ARM, which the aarch64 builds run against, ships no UEFI firmware package, so on that arch there is no VM to promise and the aarch64 package carries no Cowork pieces at all. The embedded Claude Code names bubblewrap and socat as its sandbox dependencies; both are optdepends, matching the standalone claude-code package.

Verified:

  • bin/sync-upstream claude-desktop round-trip: pinned the PKGBUILD to 1.44121.2, the sync rewrote it to 1.46388.2 byte-identical to the checked-in file, and reports no update when current.
  • makepkg smoke test of package() against the real amd64 deb: launcher, license, doc/lintian cleanup, the chrome-sandbox setuid bit, and the Cowork shims all come out right; installed alongside edk2-ovmf and virtiofsd, every path the app probes resolves to the real file and virtiofsd executes through its shim.
  • The built package installs on stock Omarchy and launches to its welcome screen as a native Wayland window (com.anthropic.Claude) under Hyprland.
  • The zstd numbers in the COMPRESSZST comment are measured on this payload (210 MB default vs 160 MB at --ultra -22, ~3 minutes extra).

One known gap, shared with 1password: the debian provider reads a single index (binary-amd64) and substitutes that version into both arch URLs. If Anthropic ever lands amd64 before arm64, that sync run fails loudly on the arm64 404 and self-heals on the next run once both are published. openai-codex-desktop's hook handles that race by comparing both indexes; if it shows up in practice here, the fix belongs in the generic provider rather than another bespoke hook.

Anthropic ships the Claude desktop app for Linux only through its own
Debian repository, so the package repacks the deb the way
openai-codex-desktop does: extract data.tar.xz, replace the bare
/usr/bin symlink with a launcher that asks Chromium for Wayland
directly, and keep the vendor copyright as the license.

Updates come through the declarative "debian" upstream provider: the
apt Packages index names the newest version, and the per-architecture
pool debs are hashed when one appears. Verified by pinning 1.44121.2
and watching bin/sync-upstream rewrite it back to 1.46388.2
byte-identically.
@spencerbull

Copy link
Copy Markdown
Contributor Author

Reviewed at 0b51b8a, with an independent codex second opinion at xhigh reasoning and build/runtime testing on a disposable Omarchy VM. The packaging and update machinery check out; the Cowork optdepends do not, and that is the one thing blocking this.

What was checked. bin/sync-upstream self-test passes. A live bin/sync-upstream claude-desktop round-trip discovered 1.49585.0 (published after this PR opened), rewrote pkgver and both arch checksums to values matching Anthropic's Packages indexes fetched independently, reset pkgrel to 1, and reported no update on re-run. makepkg against the real amd64 deb produced a 167 MB package — the ~160 MB --ultra -22 claim holds — with the launcher at usr/bin/claude-desktop (755, exact checksum), chrome-sandbox 4755, the copyright installed as the license, and no usr/share/doc/lintian residue. The package installs clean on stock Omarchy and launches as a native Wayland window (com.anthropic.Claude) under a real Hyprland session, with the launcher injecting --ozone-platform=wayland as designed; welcome and Sign In screens render. The pinned 1.46388.2 checksums match the vendor index on both arches. aarch64 was not built or executed; its checksum comes from the index only.

Finding 1 (high): the Cowork optdepends don't deliver Cowork on Arch. The app probes /usr/bin/virtiofsd and /usr/libexec/virtiofsd; Arch's virtiofsd installs at /usr/lib/virtiofsd, so it is never found, and the app's support gate requires a system-probed path when apt is unavailable — the bundled copy does not satisfy it. Firmware: the app probes /usr/share/OVMF/OVMF_CODE.fd/OVMF_CODE_4M.fd, but with edk2-ovmf installed /usr/share/OVMF symlinks to /usr/share/edk2 and the file is x64/OVMF_CODE.4m.fd — verified live, no probe matches. On aarch64 the app probes /usr/share/AAVMF/AAVMF_CODE.fd, which edk2-aarch64 provides, not edk2-ovmf — codex caught the arch split. A user who installs every listed optdepend still gets "Cowork requires QEMU". Either ship path shims (what #274 does), split the firmware optdepends per arch, or stop advertising Cowork.

Finding 2 (medium, from codex, verified): no bubblewrap/socat optdepends. The embedded Claude Code diagnoses sandbox_deps_missing without them, and this repo's claude-code already lists both as sandboxing optdepends.

Finding 3 (judgement call): the launcher doesn't pin --password-store=gnome-libsecret. hermes-desktop pins it, openai-codex-desktop (which this copies exactly — verified, two-line diff) does not, and first launch here recorded os_crypt.portal.prev_init_success: false against a healthy gnome-keyring, consistent with the intermittent "sign-in won't be saved" that #274 reports.

Rejected: codex flagged the flags-file parsing (quoted values with spaces break, # inside values is stripped) — true, but inherited byte-for-byte from the shipped chatgpt-launcher.sh; if it's worth fixing it's a change to both launchers, not this PR. Codex's claim that Arch's virtiofsd ships a /usr/bin symlink is wrong (pacman -Ql shows none), but the underlying finding stands independently. Where codex agreed with conclusions already reached here, note its independence is not guaranteed; the AAVMF split and bubblewrap/socat gap were its own contributions and were verified against the payload.

Overlap: #274 adds the same package with GPG verification of the signed index from a repo-pinned key, min_release_age, the keyring launcher fix, and exactly the shims finding 1 points at, but pins an older release and carries a bespoke hook this PR's declarative provider avoids. Which approach lands — or a merge of the two — is the maintainer's call.

Waiting on: the author for findings 1–2, and the maintainer for the #274 decision and finding 3.

🤖 Generated by Fable 5 in Claude Code. Reviewed by Codex XHigh.

…andbox deps

The app probes Debian's paths for its VM stack: /usr/libexec/virtiofsd then /usr/bin/virtiofsd, and /usr/share/OVMF/OVMF_CODE_4M.fd with the VARS path derived from it. Arch ships virtiofsd at /usr/lib/virtiofsd and the firmware at /usr/share/edk2/x64/OVMF_CODE.4m.fd, so installing the advertised optdepends still left Cowork reporting QEMU missing. Symlinks at the probed paths map them onto Arch's; the app's probe reads through them, they dangle harmlessly until the optdepends arrive, and /usr/libexec keeps the virtiofsd link out of $PATH while it does.

The firmware optdepend moves into optdepends_x86_64, and aarch64 loses its Cowork optdepends entirely: the aarch64 builds run against Arch Linux ARM, which ships no UEFI firmware package at all, so both the edk2 name and the qemu-system-aarch64 entry promised a VM that cannot boot there.

The embedded Claude Code diagnoses missing sandbox dependencies when bubblewrap and socat are absent; they join the optdepends under the same wording as the standalone claude-code package.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Codex XHigh <noreply@openai.com>
@spencerbull

Copy link
Copy Markdown
Contributor Author

Pushed cef906d addressing the review findings, verified on a disposable Omarchy VM with a codex second opinion at xhigh reasoning on the fix diff.

What changed. Symlink shims map the Debian paths the app probes onto Arch's — /usr/libexec/virtiofsd -> ../lib/virtiofsd (out of $PATH while it dangles) and, on x86_64, /usr/share/edk2/{OVMF_CODE_4M.fd,OVMF_VARS_4M.fd} -> x64/*.4m.fd, reached through edk2-ovmf's /usr/share/OVMF compat symlink. The firmware optdepend moved into optdepends_x86_64, and bubblewrap/socat joined the optdepends for the embedded Claude Code sandbox, matching claude-code.

aarch64 lost its Cowork optdepends instead of gaining a firmware one. Codex caught what my first cut of the fix missed: the aarch64 builds run against Arch Linux ARM, and its repos carry no edk2/OVMF/AAVMF package at all (verified against the mirror the builder configures — zero matches in core, extra, alarm, and aur). edk2-aarch64 would have been an uninstallable name, and with no firmware installable, the pre-existing qemu-system-aarch64 entry promised a VM that cannot boot — the same defect this commit exists to remove, so both are gone with a comment saying why.

Evidence, before and after, same VM with every advertised optdepend installed. Under 0b51b8a:

dead: /usr/libexec/virtiofsd
dead: /usr/bin/virtiofsd
dead: /usr/share/OVMF/OVMF_CODE_4M.fd
dead: /usr/share/OVMF/OVMF_CODE.fd

Under cef906d:

/usr/libexec/virtiofsd -> /usr/lib/virtiofsd
/usr/share/OVMF/OVMF_CODE_4M.fd -> /usr/share/edk2/x64/OVMF_CODE.4m.fd
/usr/share/OVMF/OVMF_VARS_4M.fd -> /usr/share/edk2/x64/OVMF_VARS.4m.fd
$ /usr/libexec/virtiofsd --version
virtiofsd 1.14.0

pacman -U succeeds in both install orders (claude-desktop before or after edk2-ovmf — the shared /usr/share/edk2 directory conflicts with nothing, and no package owns /usr/libexec or the shim names), with the optdepends absent the links dangle and the app's R_OK probe fails cleanly past them, and the app still launches to its welcome screen as a mapped native Wayland window:

class: com.anthropic.Claude   mapped: 1
1953 /usr/lib/claude-desktop/claude-desktop --ozone-platform=wayland

Codex confirmed the x86_64 shim chain hop-by-hop, the dangling-probe behavior, the per-arch optdepends arrays, and the absence of file conflicts; its one substantive finding was the aarch64 repository gap above, which reshaped the commit. Its style suggestion on the [[ ]] quoting was declined — the file's own brace-and-quote idiom wins. Past the path gates, Cowork still checks /dev/kvm access and the vhost_vsock module at runtime and tells the user what to do about them itself; those are host state, not packaging.

If Omarchy later imports a UEFI firmware package for aarch64, the optdepends and an AAVMF shim can come back in the same shape.

🤖 Generated by Fable 5 in Claude Code. Reviewed by Codex XHigh.

virtiofsd sat in the common optdepends, so aarch64 still advertised one third of a Cowork stack the package deliberately promises nothing else of there. It joins qemu and the firmware in optdepends_x86_64, and the virtiofsd shim moves under the same branch, so an aarch64 package carries no Cowork pieces at all.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Codex XHigh <noreply@openai.com>
@spencerbull

Copy link
Copy Markdown
Contributor Author

Final review of 959fa52 — ready to ship from this review's side. No blockers remain in the package; what is left open is the maintainer's choice against #274 and one judgement call noted at the end. Every check below ran on a disposable Omarchy VM built from the ISO, with an independent codex second opinion at xhigh reasoning as the last gate; codex reviewed cef906d and raised one finding, fixed in 959fa52, then the whole matrix was re-run on the new head.

Codex's finding, fixed. virtiofsd had stayed in the common optdepends, so the aarch64 package still advertised one third of a Cowork stack two lines below a comment saying aarch64 promises no Cowork at all. Every Cowork optdepend and shim is now under optdepends_x86_64 and the CARCH == x86_64 branch, and the aarch64 artifact is verified to carry none of it (below). Codex also confirmed the head is clean, metadata validation passes with fast-ring selection covering edge/rc/stable, pacman ownership/upgrade/removal of the shared directories and symlinks is sound, the desktop entry, actions and x-scheme-handler/claude survive package(), and merge with current master is clean; it rejected its own apparent /usr/share/OVMF mismatch after finding edk2-ovmf's compat symlink. Where it agreed with conclusions already reached here, its independence is not guaranteed; the virtiofsd finding was its own.

Update machinery. bin/sync-upstream self-test passes. A live bin/sync-upstream claude-desktop discovered 1.49585.0, rewrote pkgver and both arch checksums to values matching Anthropic's Packages indexes fetched independently, reset pkgrel, and reported no update on re-run:

✓   1.46388.2 -> 1.49585.0
sha256sums_x86_64=('e0b4ce6313943a69e9bd61749a293bfca241b4dfb37f88df6411b4b69ec67a40')
sha256sums_aarch64=('8a3ae3e007c36a213a16b1b5394e3a0c836baf0cf88a08491e8202952ae27020')
  Updated: 0  Skipped: 1

Both architectures build. x86_64 natively (167 MB). aarch64 with CARCH=aarch64 — package() only extracts and links, never executes the payload, so no emulation is needed — which proves the arm64 checksum and the non-x86 branch:

claude-desktop_1.46388.2_arm64.deb ... Passed
arch = aarch64
optdepend = gnome-keyring: store credentials in a system keyring
optdepend = bubblewrap: Claude Code sandboxing
optdepend = socat: Claude Code sandboxing
(no libexec, edk2 or OVMF entries)
ELF 64-bit LSB pie executable, ARM aarch64

Cowork paths on x86_64, with the optdepends installed:

/usr/libexec/virtiofsd -> /usr/lib/virtiofsd [readable]
/usr/share/OVMF/OVMF_CODE_4M.fd -> /usr/share/edk2/x64/OVMF_CODE.4m.fd [readable]
/usr/share/OVMF/OVMF_VARS_4M.fd -> /usr/share/edk2/x64/OVMF_VARS.4m.fd [readable]
$ /usr/libexec/virtiofsd --version
virtiofsd 1.14.0

Dependencies. The body's claim holds: all 36 NEEDED sonames across every ELF in the payload resolve to packages inside the transitive closure (209 packages) of the 16 declared depends, with libffmpeg.so bundled. pacman -U installs on stock Omarchy in either order relative to edk2-ovmf; pacman -Rns leaves nothing behind (/usr/libexec, both firmware links and the desktop entry gone) and pacman -Qkk edk2-ovmf reports 0 altered files afterward. namcap is not part of this repo's pipeline; its warnings are the prebuilt-Electron set openai-codex-desktop shares, and its three symlink errors are the dangling-by-design shims.

Runtime, through the desktop entry (gtk-launch com.anthropic.Claude), on a fresh profile:

class: com.anthropic.Claude   mapped: 1
/usr/lib/claude-desktop/claude-desktop --ozone-platform=wayland

First launch, native Wayland window under Hyprland:

Claude for Linux welcome screen

Sign In reached:

Sign In screen

The desktop entry and icon resolve in Omarchy's app launcher:

App launcher search for claude

Not blockers, but on the record. Install → AI in the Omarchy menu does not list Claude Desktop — that entry lives in omacom/omarchy and has to land after this package exists:

Install AI menu without Claude

Past the path gates, Cowork checks /dev/kvm access and the vhost_vsock module at runtime and tells the user what to do about each; that is host state, not packaging. aarch64 was built and inspected but never executed — no arm64 worker exists here. The launcher still does not pin --password-store=gnome-libsecret; first launch again recorded os_crypt.portal.prev_init_success: false against a healthy gnome-keyring, which is the condition #274 reports as intermittent "sign-in won't be saved". That remains the one judgement call for the maintainer, alongside the choice between this PR and #274.

🤖 Generated by Fable 5 in Claude Code. Reviewed by Codex XHigh.

@spencerbull
spencerbull merged commit d2d1fd7 into omacom:master Sep 10, 2026
2 checks passed
@spencerbull
spencerbull deleted the add-claude-desktop branch September 10, 2026 20:30
@spencerbull

Copy link
Copy Markdown
Contributor Author

Correction to the final review above: the first rc release build of this merge (d2d1fd7) failed with "Could not resolve all dependencies", and the review had no standing to predict otherwise, because it never ran the release builder's path. Every build in the review was bare makepkg on an Omarchy VM that already had every dependency installed — that proves package() and the artifact and nothing about dependency resolution, which bin/build does inside the channel's container against the channel's mirror. That was my omission, not something the diff hid.

The package itself is fine. The same commit built and published to edge and stable on the release builder (pkgs.omarchy.org/{edge,stable}/x86_64 both carry claude-desktop-1.46388.2-1); only the rc run failed. Reproducing the failing command — bin/build --package claude-desktop --mirror rc --arch x86_64 — on a clean worker succeeded (makepkg -s installed 106 packages, 112 MiB, from the rc mirror; Built: 1, Failed: 0), the rc databases have not changed since Sep 7, every declared dependency is present in them, and the published rc repo shares no package name with anything in the dependency closure. So the rc failure was environmental on the builder — a transient fetch or disk pressure inside its container storage are the usual shapes — and auto-release retries on its own backoff; the full pacman error is in the builder's journalctl -u omarchy-auto-release-rc.service, above the 25 lines the alert carries.

So the pattern runs before merge from now on: #388 adds a build-changed workflow that diffs pkgbuilds/ against the base, asks package_builds_for_mirror which mirrors each changed package ships to, and runs bin/build per mirror as a matrix — the exact command the release builder runs. Proven on a fork against this package: edge, rc and stable each built in six to seven minutes on ubuntu-latest, rc included (https://github.com/spencerbull/omarchy-pkgs/actions/runs/34531142335):

==> Installing missing dependencies...
Packages (106) adwaita-cursors-50.0-1  adwaita-fonts-51.0-2  adwaita-icon-theme-50.0-1 ...
Total Download Size:   112.73 MiB
==> Finished making: claude-desktop 1.46388.2-1
    Successfully built claude-desktop

The review protocol on the omabot side is updated the same way (omacom/omabot#26): for omarchy-pkgs, the declared test entry point is bin/build per shipped channel, never bare makepkg.

🤖 Generated by Fable 5 in Claude Code.

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