Skip to content

fix(blanc): restore sandboxed ECS startup - #841

Closed
bnfy wants to merge 1 commit into
flatpark:mainfrom
bnfy:fix/blanc-ecs-flatpak
Closed

bnfy wants to merge 1 commit into
flatpark:mainfrom
bnfy:fix/blanc-ecs-flatpak

Conversation

@bnfy

@bnfy bnfy commented Oct 25, 2026 •

Copy link
Copy Markdown

I maintain Blanc. This implements the packaging workaround discussed in bnfy/blanc#580 and pins com.blancbrowser.Blanc to the tested, unmodified 1.43.1 AppImage.

Packaging

  • Remove CHROME_DESKTOP at the manifest level so portal-spawned zygotes avoid the premature GIO desktop lookup.
  • Recognize the new blanc-ecs-launcher AppRun layout without executing AppRun, retaining the old layout and payload checks.
  • Use the existing native launcher's query to validate the default profile, pass that profile explicitly, then run the original blanc ELF through zypak. Reject conflicting custom --user-data-dir arguments.
  • Keep the CDM preload out of the Flatpak path and state in the package description that protected playback remains unavailable. No vendor files are patched.

Sandbox

The renderer sandbox stays enabled. No sandbox-disabling flags, setuid changes, host commands, or added permissions. Runtime/base remain Freedesktop 26.08 and Electron2.BaseApp 26.08. The community-maintained label and approval status are unchanged.

Validation

  • Descriptor validation/audit, shell syntax, and new wrapper regression tests pass locally.
  • Native x86-64 validation passed the real extra-data install, navigation through the actual address editor, reload, clean exit, and storage persistence across restart. All 132 original regular files and original symlinks matched the verified upstream AppImage.
  • Four observed renderers on each launch retained seccomp, NoNewPrivs, an additional seccomp filter, separate PID/network namespaces, and zypak mappings. A Debian 13 x86-64 VM also passed browsing and renderer-sandbox checks.
  • Exact PR validation passed for commit da358ecad159ece0009b8adf22b1a0bb41317072: the complete FlatPark shell suite (including the new wrapper tests), check-apply-extra.sh as root with no capabilities, and publish.sh --verify using the documented Flathub Builder. The locally signed repository installed successfully.
  • The installed PR package then passed the real address-editor navigation, reload, clean close, same-profile restart, storage-persistence, and renderer-sandbox checks. No test-only code or debug flags were added to the shipped wrapper.
  • FlatPark's own fork-PR workflow is awaiting maintainer approval.
  • Not qualified: DRM, Wayland, full desktop integration, home-folder diff, window-class grouping, media/tray bus names, second-instance behavior, file chooser portals, notifications, or screen sharing. This is scoped X11/default-profile validation, not blanket endorsement. Please retain the normal review gates for untested desktop behavior.

@bnfy
bnfy marked this pull request as ready for review October 25, 2026 02:47
@jing2uo

jing2uo commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

Thanks a lot for this PR, and for tracking the startup failure down so quickly in bnfy/blanc#580. The CHROME_DESKTOP finding was the key.

While this PR was coming in, I had already made and tested the same fix locally (unpack, X11 and Wayland startup, renderer sandbox, restart). It's now merged as #842, with the same approach: --unset-env=CHROME_DESKTOP, the Electron ELF run directly under zypak with BLANC_ECS_LAUNCHER_ROOT / BLANC_ECS_FULL_PROFILE and a matching --user-data-dir, and a note in the metainfo that protected playback isn't available.

I merged mine rather than this one because this PR adds an app-specific test under tests/. Under the repo's current rules, tests/ only covers the shared scripts, not individual apps. That said, giving each app its own tests is a good idea, and I'll look at turning it into a proper convention.

Thanks again for taking the time to dig into the Flatpak side!

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