Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
fix(images): keep Chromium tabs alive under gVisor on arm64 (#4658)
Francesco Bonaccif68b80602417
diff --git a/.github/workflows/cd-image-linux.yml b/.github/workflows/cd-image-linux.ymlindex 47049e9ddd..b1b195bae3 100644--- a/.github/workflows/cd-image-linux.yml+++ b/.github/workflows/cd-image-linux.yml@@ -702,6 +702,8 @@ jobs:- run: scripts/images/test-schedule-scripts.sh- name: boot-qemu.sh SSH probe retries (fake ssh)run: libs/images/common/tests/test-ssh-retry.sh+ - name: Browser sandbox choice per runtime (stubbed probes)+ run: libs/images/common/tests/test-browser-sandbox.sh- name: Manifest generator, ledger and docs-gate testsrun: |python3 -m unittest discover -s libs/images/common/tools/testsdiff --git a/libs/cua-driver/rust/crates/cua-driver-core/src/browser/prepare.rs b/libs/cua-driver/rust/crates/cua-driver-core/src/browser/prepare.rsindex ad4309cb26..c8a103bf53 100644--- a/libs/cua-driver/rust/crates/cua-driver-core/src/browser/prepare.rs+++ b/libs/cua-driver/rust/crates/cua-driver-core/src/browser/prepare.rs@@ -424,14 +424,49 @@ fn cleanup_created_profile_as_browser(fn configure_linux_isolated_browser_command(command: &mut Command,native_wayland: bool,- no_sandbox: bool,+ sandbox: LinuxBrowserSandbox,) {command.arg("--password-store=basic");if native_wayland {command.arg("--ozone-platform=wayland");}- if no_sandbox {- command.arg("--no-sandbox");+ match sandbox {+ LinuxBrowserSandbox::Full => {}+ LinuxBrowserSandbox::NoSeccomp => {+ command.arg("--disable-seccomp-filter-sandbox");+ }+ LinuxBrowserSandbox::None => {+ command.arg("--no-sandbox");+ }+ }+}++/// How much of Chromium's own sandbox the runtime carries. The image decides+/// (libs/images/common/desktop/browser-sandbox.sh writes the variables into+/// the session environment); nothing is guessed here.+#[cfg(target_os = "linux")]+#[derive(Clone, Copy, Debug, PartialEq, Eq)]+enum LinuxBrowserSandbox {+ /// Namespaces and seccomp-bpf, as shipped.+ Full,+ /// gVisor on arm64: namespaces work, the renderer's seccomp-bpf filter+ /// kills every tab, so only that layer goes off.+ NoSeccomp,+ /// No unprivileged user namespaces (a container under docker's default+ /// seccomp profile): the container boundary is the sandbox.+ None,+}++#[cfg(target_os = "linux")]+fn linux_browser_sandbox(var: impl Fn(&str) -> Option<String>) -> LinuxBrowserSandbox {+ let on = |name: &str| var(name).as_deref() == Some("1");+ // CUA_E2E_BROWSER_NO_SANDBOX is the older test spelling.+ if on("CUA_DRIVER_BROWSER_NO_SANDBOX") || on("CUA_E2E_BROWSER_NO_SANDBOX") {+ LinuxBrowserSandbox::None+ } else if on("CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX") {+ LinuxBrowserSandbox::NoSeccomp+ } else {+ LinuxBrowserSandbox::Full}}@@ -461,17 +496,8 @@ fn isolated_browser_command(executable: &str, profile: &Path) -> Command {.is_ok_and(|session| session.eq_ignore_ascii_case("wayland"))&& std::env::var_os("WAYLAND_DISPLAY").is_some()&& std::env::var_os("DISPLAY").is_none();- // The runtime cannot give Chromium its own sandbox (a container- // without unprivileged user namespaces): the container boundary is- // the sandbox. Set by the image (libs/images/linux detects it), never- // guessed here; CUA_E2E_BROWSER_NO_SANDBOX is the older test spelling.- let no_sandbox = [- "CUA_DRIVER_BROWSER_NO_SANDBOX",- "CUA_E2E_BROWSER_NO_SANDBOX",- ]- .iter()- .any(|name| std::env::var(name).as_deref() == Ok("1"));- configure_linux_isolated_browser_command(&mut command, native_wayland, no_sandbox);+ let sandbox = linux_browser_sandbox(|name| std::env::var(name).ok());+ configure_linux_isolated_browser_command(&mut command, native_wayland, sandbox);}let stderr = if std::env::var_os("CUA_E2E_BROWSER_STDERR").is_some() {Stdio::inherit()@@ -1947,7 +1973,7 @@ mod tests {#[test]fn isolated_launch_can_select_native_wayland_and_test_vm_sandbox_mode() {let mut command = Command::new("chromium-under-test");- configure_linux_isolated_browser_command(&mut command, true, true);+ configure_linux_isolated_browser_command(&mut command, true, LinuxBrowserSandbox::None);let args = command.get_args().map(|arg| arg.to_string_lossy().into_owned())@@ -1956,4 +1982,45 @@ mod tests {assert!(args.iter().any(|arg| arg == "--ozone-platform=wayland"));assert!(args.iter().any(|arg| arg == "--no-sandbox"));}++ #[cfg(target_os = "linux")]+ #[test]+ fn isolated_launch_sandbox_flags_follow_the_image_variables() {+ let flags = |vars: &[(&str, &str)]| {+ let vars = vars+ .iter()+ .map(|(k, v)| (k.to_string(), v.to_string()))+ .collect::<std::collections::HashMap<_, _>>();+ let sandbox = linux_browser_sandbox(|name| vars.get(name).cloned());+ let mut command = Command::new("chromium-under-test");+ configure_linux_isolated_browser_command(&mut command, false, sandbox);+ command+ .get_args()+ .map(|arg| arg.to_string_lossy().into_owned())+ .filter(|arg| arg.contains("sandbox"))+ .collect::<Vec<_>>()+ };+ assert!(flags(&[]).is_empty());+ assert_eq!(+ flags(&[("CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX", "1")]),+ ["--disable-seccomp-filter-sandbox"]+ );+ assert_eq!(+ flags(&[("CUA_DRIVER_BROWSER_NO_SANDBOX", "1")]),+ ["--no-sandbox"]+ );+ assert_eq!(+ flags(&[("CUA_E2E_BROWSER_NO_SANDBOX", "1")]),+ ["--no-sandbox"]+ );+ // --no-sandbox already drops the seccomp layer with the rest.+ assert_eq!(+ flags(&[+ ("CUA_DRIVER_BROWSER_NO_SANDBOX", "1"),+ ("CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX", "1"),+ ]),+ ["--no-sandbox"]+ );+ assert!(flags(&[("CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX", "0")]).is_empty());+ }}diff --git a/libs/images/common/desktop/browser-sandbox.sh b/libs/images/common/desktop/browser-sandbox.shnew file mode 100644index 0000000000..0d57b10b42--- /dev/null+++ b/libs/images/common/desktop/browser-sandbox.sh@@ -0,0 +1,57 @@+# shellcheck shell=bash+# Which of the browsers' own sandboxes this runtime can carry. Sourced by+# start-desktop.sh (the results go into desktop.env) and by+# ../tests/test-browser-sandbox.sh, which stubs the three probes below.++under_gvisor() {+ # Current runsc releases name themselves in the kernel release; older+ # ones only in the first dmesg line.+ grep -qi gvisor /proc/sys/kernel/osrelease 2>/dev/null \+ || dmesg 2>/dev/null | head -1 | grep -q gVisor+}+unprivileged_userns() { unshare --user --map-root-user true 2>/dev/null; }+machine() { uname -m; }++# Prints the desktop.env lines that turn Firefox's and Chromium's sandboxes+# down to what the runtime supports, and nothing where they work as shipped.+#+# Firefox under gVisor: its content/RDD/GPU children die with+# "VideoBridgeParent ... AbnormalShutdown" and no window maps, so its inner+# sandboxes go off there.+#+# Chromium keeps its namespace sandbox wherever the runtime has one:+# - No unprivileged user namespaces (docker's default seccomp profile): no+# sandbox at all is possible, the container boundary is the sandbox, and+# Chromium runs with --no-sandbox (CUA_DRIVER_BROWSER_NO_SANDBOX).+# - gVisor on arm64: the namespaces work, but the renderer's seccomp-bpf+# filter kills every tab ("Aw, Snap!", "seccomp-bpf failure in syscall+# nr=0x7b", sched_getaffinity). Only the seccomp layer goes off+# (--disable-seccomp-filter-sandbox, CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX);+# the namespace sandbox stays, and gVisor filters the syscalls itself.+# gVisor on x86_64 runs the full sandbox.+# Either variable set by the operator wins over detection.+browser_sandbox_env() {+ local gvisor=0+ under_gvisor && gvisor=1+ if [ "$gvisor" = 1 ]; then+ local v+ for v in MOZ_DISABLE_CONTENT_SANDBOX MOZ_DISABLE_GMP_SANDBOX MOZ_DISABLE_RDD_SANDBOX \+ MOZ_DISABLE_SOCKET_PROCESS_SANDBOX MOZ_DISABLE_UTILITY_SANDBOX; do+ echo "$v=1"+ done+ fi+ if [ -n "${CUA_DRIVER_BROWSER_NO_SANDBOX:-}" ] || [ -n "${CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX:-}" ]; then+ [ -n "${CUA_DRIVER_BROWSER_NO_SANDBOX:-}" ] \+ && echo "CUA_DRIVER_BROWSER_NO_SANDBOX=$CUA_DRIVER_BROWSER_NO_SANDBOX"+ [ -n "${CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX:-}" ] \+ && echo "CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX=$CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX"+ return 0+ fi+ if [ "$gvisor" = 1 ]; then+ case "$(machine)" in+ aarch64 | arm64) echo "CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX=1" ;;+ esac+ elif ! unprivileged_userns; then+ echo "CUA_DRIVER_BROWSER_NO_SANDBOX=1"+ fi+}diff --git a/libs/images/common/desktop/start-desktop.sh b/libs/images/common/desktop/start-desktop.shindex 2449a2a25b..685f925232 100755--- a/libs/images/common/desktop/start-desktop.sh+++ b/libs/images/common/desktop/start-desktop.sh@@ -103,30 +103,20 @@ export GNOME_ACCESSIBILITY=1 QT_ACCESSIBILITY=1 QT_LINUX_ACCESSIBILITY_ALWAYS_ONexport MOZ_ENABLE_ACCESSIBILITY=1 ACCESSIBILITY_ENABLED=1unset NO_AT_BRIDGE SESSION_MANAGER-# gVisor (runsc) doesn't give Firefox's per-process sandboxes what they need-# (its content/RDD/GPU children die with "VideoBridgeParent ... AbnormalShutdown"-# and no window ever maps). The container boundary is the sandbox there, so-# turn Firefox's inner ones off only when running under gVisor.-SANDBOX_ENV=""-if dmesg 2>/dev/null | head -1 | grep -q gVisor; then- for v in MOZ_DISABLE_CONTENT_SANDBOX MOZ_DISABLE_GMP_SANDBOX MOZ_DISABLE_RDD_SANDBOX \- MOZ_DISABLE_SOCKET_PROCESS_SANDBOX MOZ_DISABLE_UTILITY_SANDBOX; do- export "$v=1"; SANDBOX_ENV="$SANDBOX_ENV$v=1+# The browsers' own sandboxes, as far as this runtime carries them+# (browser-sandbox.sh): Firefox's inner sandboxes go off under gVisor, so its+# variables are exported into the session; Chromium's flags are read from+# desktop.env by /etc/chromium.d/cua-sandbox and by cua-driver.+# shellcheck source=browser-sandbox.sh+. "$(dirname "$0")/browser-sandbox.sh"+SANDBOX_ENV="$(browser_sandbox_env)"+while IFS= read -r line; do+ case "$line" in MOZ_DISABLE_*) export "${line?}" ;; esac+done <<<"$SANDBOX_ENV"+if [ -n "$SANDBOX_ENV" ]; then+ log "browser sandbox settings: $(echo "$SANDBOX_ENV" | tr '\n' ' ')"+ SANDBOX_ENV="$SANDBOX_ENV"- done- log "gVisor detected: Firefox inner sandboxes disabled"-fi--# Chromium keeps its own sandbox wherever the runtime allows it: gVisor gives-# it namespaces and seccomp; a plain container without unprivileged user-# namespaces (docker's default seccomp profile) cannot, and there the-# container boundary is the sandbox, so cua-driver launches Chromium with-# --no-sandbox (CUA_DRIVER_BROWSER_NO_SANDBOX).-if [ -z "${CUA_DRIVER_BROWSER_NO_SANDBOX:-}" ] && ! dmesg 2>/dev/null | head -1 | grep -q gVisor \- && ! unshare --user --map-root-user true 2>/dev/null; then- SANDBOX_ENV="${SANDBOX_ENV}CUA_DRIVER_BROWSER_NO_SANDBOX=1-"- log "no unprivileged user namespaces: Chromium runs without its own sandbox"fi# Persist the session environment so `docker exec` / helpers can source it.diff --git a/libs/images/common/tests/test-browser-sandbox.sh b/libs/images/common/tests/test-browser-sandbox.shnew file mode 100755index 0000000000..793c9743a1--- /dev/null+++ b/libs/images/common/tests/test-browser-sandbox.sh@@ -0,0 +1,77 @@+#!/usr/bin/env bash+# Offline test for the browser sandbox choice: common/desktop/browser-sandbox.sh+# (what start-desktop.sh writes into desktop.env) and the Chromium launcher+# snippet that reads it (linux/files/chromium.d/cua-sandbox).+set -euo pipefail+HERE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"+IMAGES="$(cd "$HERE/../.." && pwd)"+tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT+pass=0 fail=0+expect() { # name want got+ if [ "$2" = "$3" ]; then+ pass=$((pass + 1))+ else+ fail=$((fail + 1)); printf 'FAIL %s\n want: %s\n got: %s\n' "$1" "$2" "$3"+ fi+}++# browser_sandbox_env with stubbed probes: GVISOR=0|1 USERNS=0|1 MACHINE=...+env_for() {+ (+ unset CUA_DRIVER_BROWSER_NO_SANDBOX CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX+ for kv in "$@"; do export "${kv?}"; done+ # shellcheck source=../desktop/browser-sandbox.sh+ . "$IMAGES/common/desktop/browser-sandbox.sh"+ under_gvisor() { [ "$GVISOR" = 1 ]; }+ unprivileged_userns() { [ "$USERNS" = 1 ]; }+ machine() { echo "$MACHINE"; }+ browser_sandbox_env | grep -v '^MOZ_' | tr '\n' ' '+ echo "moz=$(browser_sandbox_env | grep -c '^MOZ_DISABLE_')"+ )+}++expect "runc with user namespaces: full sandboxes" \+ "moz=0" "$(env_for GVISOR=0 USERNS=1 MACHINE=x86_64)"+expect "runc without user namespaces: --no-sandbox" \+ "CUA_DRIVER_BROWSER_NO_SANDBOX=1 moz=0" "$(env_for GVISOR=0 USERNS=0 MACHINE=aarch64)"+expect "gVisor x86_64: Chromium sandbox kept, Firefox inner sandboxes off" \+ "moz=5" "$(env_for GVISOR=1 USERNS=1 MACHINE=x86_64)"+expect "gVisor arm64: seccomp layer off only" \+ "CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX=1 moz=5" "$(env_for GVISOR=1 USERNS=1 MACHINE=aarch64)"+expect "gVisor arm64 never falls back to --no-sandbox" \+ "CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX=1 moz=5" "$(env_for GVISOR=1 USERNS=0 MACHINE=aarch64)"+expect "operator override wins over detection" \+ "CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX=0 moz=5" \+ "$(env_for GVISOR=1 USERNS=1 MACHINE=aarch64 CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX=0)"+expect "operator --no-sandbox is kept" \+ "CUA_DRIVER_BROWSER_NO_SANDBOX=1 moz=0" \+ "$(env_for GVISOR=0 USERNS=1 MACHINE=x86_64 CUA_DRIVER_BROWSER_NO_SANDBOX=1)"++# The launcher snippet, sourced by /bin/sh the way /usr/bin/chromium does.+flags_for() { # desktop.env contents, then optional VAR=value environment+ local envfile="$1"; shift+ mkdir -p "$tmp/run"; printf '%s' "$envfile" >"$tmp/run/desktop.env"+ env -u CUA_DRIVER_BROWSER_NO_SANDBOX -u CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX \+ XDG_RUNTIME_DIR="$tmp/run" "$@" sh -c \+ 'CHROMIUM_FLAGS=" --base"; . "$0"; echo "$CHROMIUM_FLAGS|${cua_val-unset}"' \+ "$IMAGES/linux/files/chromium.d/cua-sandbox"+}+expect "snippet: nothing in desktop.env" " --base|unset" "$(flags_for 'DISPLAY=:1+')"+expect "snippet: seccomp off" " --base --disable-seccomp-filter-sandbox|unset" \+ "$(flags_for 'DISPLAY=:1+CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX=1+')"+expect "snippet: no sandbox" " --base --no-sandbox|unset" \+ "$(flags_for 'CUA_DRIVER_BROWSER_NO_SANDBOX=1+')"+expect "snippet: environment wins over desktop.env" " --base|unset" \+ "$(flags_for 'CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX=1+' CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX=0)"+expect "snippet: no desktop.env at all" " --base|unset" \+ "$(env -u CUA_DRIVER_BROWSER_NO_SANDBOX -u CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX \+ XDG_RUNTIME_DIR="$tmp/missing" sh -c 'CHROMIUM_FLAGS=" --base"; . "$0"; echo "$CHROMIUM_FLAGS|${cua_val-unset}"' \+ "$IMAGES/linux/files/chromium.d/cua-sandbox")"++echo "browser-sandbox: $pass passed, $fail failed"+[ "$fail" = 0 ]diff --git a/libs/images/linux/Dockerfile b/libs/images/linux/Dockerfileindex 99bdf1c371..8978ce432a 100644--- a/libs/images/linux/Dockerfile+++ b/libs/images/linux/Dockerfile@@ -104,7 +104,9 @@ RUN install -d -m 0755 /etc/apt/keyrings# keyserver.ubuntu.com, so a keyserver outage cannot break the build.# cua-driver's browser_prepare launches /usr/lib/chromium/chromium (a# root-owned package payload) with a driver-owned throwaway profile. The-# managed policy turns off first-run noise, sign-in and password saving.+# managed policy turns off first-run noise, sign-in and password saving, and+# the "unsupported command-line flag" bar: the image picks the sandbox flags+# per runtime (common/desktop/browser-sandbox.sh), not the user.# Per-arch pins: the PPA keeps only its newest build per arch, and the# arches do not always move together. CHROMIUM_VERSION, when set, wins.ARG CHROMIUM_VERSION=@@ -129,7 +131,8 @@ RUN --mount=type=bind,source=common/apt-keys/xtradeb-apps.asc,target=/tmp/xtrade&& mkdir -p /etc/chromium/policies/managed /etc/cua-image \&& printf '%s\n' '{"BrowserSignin":0,"SyncDisabled":true,"PasswordManagerEnabled":false,' \'"PromotionsEnabled":false,"DefaultBrowserSettingEnabled":false,"MetricsReportingEnabled":false,' \- '"PrivacySandboxPromptEnabled":false,"TranslateEnabled":false}' \+ '"PrivacySandboxPromptEnabled":false,"TranslateEnabled":false,' \+ '"CommandLineFlagSecurityWarningsEnabled":false}' \>/etc/chromium/policies/managed/cua.json \&& python3 -m json.tool /etc/chromium/policies/managed/cua.json >/dev/null \&& test -x /usr/lib/chromium/chromium \@@ -197,6 +200,7 @@ COPY linux/files/start-spacesd.sh linux/files/ensure-env-token.sh \linux/files/env-token-mode.sh linux/files/start-token-sync.sh \linux/files/start-audio.sh linux/files/cua-chromium /opt/cua/bin/COPY linux/files/pipewire/ /etc/pipewire/pipewire.conf.d/+COPY linux/files/chromium.d/cua-sandbox /etc/chromium.d/cua-sandboxCOPY linux/files/spacesd.healthcheck.sh /opt/cua/healthcheck.d/10-spacesd.shCOPY common/desktop/systemd/ linux/files/systemd/ /usr/lib/systemd/system/COPY linux/files/udev/ /usr/lib/udev/rules.d/diff --git a/libs/images/linux/files/chromium.d/cua-sandbox b/libs/images/linux/files/chromium.d/cua-sandboxnew file mode 100644index 0000000000..f12bd88d5d--- /dev/null+++ b/libs/images/linux/files/chromium.d/cua-sandbox@@ -0,0 +1,20 @@+# Sourced by /usr/bin/chromium (the Debian launcher reads every file in+# /etc/chromium.d), so the desktop menu, the XFCE web-browser helper and+# /opt/cua/bin/cua-chromium all start Chromium with the sandbox flags that+# start-desktop.sh chose for this runtime (common/desktop/browser-sandbox.sh).+# cua-driver's browser tools read the same two variables.+cua_env_file="${XDG_RUNTIME_DIR:-/run/cua-desktop}/desktop.env"+for cua_var in CUA_DRIVER_BROWSER_NO_SANDBOX CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX; do+ eval "cua_val=\${$cua_var:-}"+ if [ -z "$cua_val" ] && [ -r "$cua_env_file" ]; then+ cua_val="$(sed -n "s/^$cua_var=//p" "$cua_env_file" | tail -1)"+ fi+ if [ "$cua_val" = 1 ]; then+ case "$cua_var" in+ CUA_DRIVER_BROWSER_NO_SANDBOX) CHROMIUM_FLAGS="$CHROMIUM_FLAGS --no-sandbox" ;;+ CUA_DRIVER_BROWSER_NO_SECCOMP_SANDBOX) CHROMIUM_FLAGS="$CHROMIUM_FLAGS --disable-seccomp-filter-sandbox" ;;+ esac+ fi+done+export CHROMIUM_FLAGS+unset cua_env_file cua_var cua_valdiff --git a/libs/images/linux/files/cua-chromium b/libs/images/linux/files/cua-chromiumindex fd867af086..732e5b0259 100755--- a/libs/images/linux/files/cua-chromium+++ b/libs/images/linux/files/cua-chromium@@ -1,14 +1,6 @@#!/bin/sh-# Chromium as the desktop session starts it: with its own sandbox wherever the-# runtime allows one, and with --no-sandbox only where start-desktop found no-# unprivileged user namespaces (docker's default seccomp profile), the same-# rule cua-driver's browser tools follow (CUA_DRIVER_BROWSER_NO_SANDBOX).-# image.json's launch_app claim and the XFCE web-browser helper use this.-env_file="${XDG_RUNTIME_DIR:-/run/cua-desktop}/desktop.env"-if [ -z "${CUA_DRIVER_BROWSER_NO_SANDBOX:-}" ] && [ -r "$env_file" ]; then- CUA_DRIVER_BROWSER_NO_SANDBOX="$(sed -n 's/^CUA_DRIVER_BROWSER_NO_SANDBOX=//p' "$env_file" | tail -1)"-fi-if [ "${CUA_DRIVER_BROWSER_NO_SANDBOX:-}" = 1 ]; then- exec /usr/bin/chromium --no-sandbox "$@"-fi+# Chromium as the desktop session starts it. /usr/bin/chromium sources+# /etc/chromium.d/cua-sandbox, which adds the sandbox flags start-desktop+# chose for this runtime (none where Chromium's own sandbox works).+# image.json's launch_app claim uses this.exec /usr/bin/chromium "$@"