Skip to content

fix(cli): debian and ubuntu users get the .deb from the app download link - #9136

Merged
miguel-heygen merged 2 commits into
mainfrom
oncall/cli-linux-deb-link
Nov 30, 2026
Merged

miguel-heygen merged 2 commits into
mainfrom
oncall/cli-linux-deb-link

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

On Debian, Ubuntu and their derivatives, the CLI's "download the desktop app" link now points to the .deb. Other Linux systems still get the AppImage.

Why

On Ubuntu 24.04 and later the AppImage does not start. The system blocks unprivileged user namespaces by default (kernel.apparmor_restrict_unprivileged_userns=1), and an AppImage's chrome-sandbox can't be setuid root. So Chromium aborts before the window opens, with "The SUID sandbox helper binary was found, but is not configured correctly". The .deb installs chrome-sandbox setuid root and loads an AppArmor profile, so it starts there.

The CLI handed every Linux user ?os=linux, the AppImage. The site's own default for a Linux browser is already the .deb.

Related work

The download route already serves os=deb (the .deb) and os=linux (the AppImage).

How

  • desktopDownloadUrl asks detectLinuxDistro() (the CLI's existing /etc/os-release reader in browser/linuxDeps.ts), only on Linux.
  • The debian family (Debian, Ubuntu, Mint, Pop!_OS, elementary, Kali) gets os=deb. Any other family, or an unreadable /etc/os-release, keeps os=linux.
  • Every caller goes through that function: the CLI's hint after a render or preview, the "not installed" answer of open, and the browser editor's "Open in desktop" route.

Test plan

fails without the fix: desktopApp.test.ts "offers Debian and Ubuntu the .deb, other Linux systems the AppImage" (against main's desktopApp.ts the Debian case gets os=linux).

  • Unit tests added/updated: that test fakes only the distro probe, as ffmpeg.test.ts does. With the change, desktopApp.test.ts and desktopRoutes.test.ts pass 56/56, 3 runs in a row.
  • Manual testing performed: the b1387 Canary AppImage on Ubuntu 24.04.5 aborts at start as described. The same build's .deb carries the setuid chrome-sandbox and an AppArmor profile in its postinst. I didn't install the .deb here (no root on that machine).
  • Documentation updated (if applicable): the install docs already send Debian-based systems to the .deb.
  • Comments follow CONTRIBUTING.md "Comments"

Not exercised: a real Fedora or Arch machine following the link; their family resolves to os=linux as before.

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 7298a92. Full diff read (2 files, +30 −2), plus detectLinuxDistro and its callers of desktopDownloadUrl (desktopHint, the open answer, mountDesktopRoutes). Nothing run locally.

The change is right. All three callers go through desktopDownloadUrl, the probe runs only when the platform is Linux, and an unreadable /etc/os-release falls back to the AppImage link as before. The body carries the "fails without the fix:" line and the named test exists and pins both the .deb and the AppImage cases.

One thing holds it, caused by this change: Comments is red at this head:

RAISED comment share: packages/cli/src/utils/desktopApp.ts is 4.6% (16/347), at the base 4.4% (15/344). 1 comment line(s) added.

That is the one-line comment above linuxDownload. Drop it or fold the reason into a name (the PR body already carries the why). I approve as soon as Comments is green; no other change needed.

Need: yes · Size: fits · Reuse: yes, the existing os-release reader · Simpler: no · Structure: fine
Risk: low. Not checked by me: that the download route serves a .deb for every architecture the AppImage link covers.

— Rames

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 275 (base branch 275), smooth 50 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (0)

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at bb96cf7. Delta since 7298a92 compared by bytes: the added comment line is gone and the helper is renamed debOnDebianFamilyElseAppImage, nothing else. Behaviour is the same as the head I read in full.

Prior point: resolved. The file no longer adds a comment line, so the comment-share check has nothing to raise; Comments was still pending when I looked, not red. Nothing run locally.

Need: yes · Size: fits · Reuse: yes, the existing os-release reader · Simpler: no · Structure: fine
Risk: low. Not checked by me: that the download route serves a .deb for every architecture the AppImage link covers.

— Rames

@miguel-heygen
miguel-heygen added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit 8a0295a Nov 30, 2026
90 checks passed
@miguel-heygen
miguel-heygen deleted the oncall/cli-linux-deb-link branch November 30, 2026 08:26
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.

2 participants