diff --git a/bin/omarchy-upgrade-to-quattro b/bin/omarchy-upgrade-to-quattro index 32ea6465..7c5292cd 100755 --- a/bin/omarchy-upgrade-to-quattro +++ b/bin/omarchy-upgrade-to-quattro @@ -1328,7 +1328,7 @@ apply_system_transition() { ' fi as_root install -d -m 0755 /usr/lib/chromium - printf '%s\n' '{"browser":{"theme":{"color_scheme":0,"color_scheme2":0}}}' | \ + printf '%s\n' '{"distribution":{"require_eula":false},"browser":{"theme":{"color_scheme":0,"color_scheme2":0}}}' | \ as_root tee /usr/lib/chromium/initial_preferences >/dev/null # Deliberately do NOT add the user to the docker group. That group is diff --git a/install/config/theme-system.sh b/install/config/theme-system.sh index 83db0e15..1527e17e 100644 --- a/install/config/theme-system.sh +++ b/install/config/theme-system.sh @@ -6,7 +6,8 @@ ln -snf /usr/share/icons/Adwaita/symbolic/actions/go-next-symbolic.svg \ /usr/share/icons/Yaru/scalable/actions/go-next-symbolic.svg gtk-update-icon-cache /usr/share/icons/Yaru &>/dev/null || true -# Default Chromium to follow system appearance ("device") instead of dark +# Seed Chromium's first run: follow system appearance ("device") instead of dark, +# and skip the terms-of-service dialog Chromium 151 turned on by default. mkdir -p /usr/lib/chromium -echo '{"browser":{"theme":{"color_scheme":0,"color_scheme2":0}}}' > \ +echo '{"distribution":{"require_eula":false},"browser":{"theme":{"color_scheme":0,"color_scheme2":0}}}' > \ /usr/lib/chromium/initial_preferences diff --git a/migrations/1787691200.sh b/migrations/1787691200.sh new file mode 100644 index 00000000..71c163e5 --- /dev/null +++ b/migrations/1787691200.sh @@ -0,0 +1,18 @@ +echo "Skip Chromium's new first-run EULA on machines already on Quattro" + +# Chromium 151 flipped MasterPrefs::eula_required from false to true, so an +# unconfigured first run now stops on a blank terms-of-service dialog before the +# browser opens. Omarchy answers that in the seed it writes next to the Chromium +# binary, but that seed is only laid down by a fresh install and by the one-time +# 3.x upgrade, so machines already on Quattro never receive it. Retrofit it here. +# +# The literal is deliberately duplicated rather than sourced: a migration repairs +# the state of its own moment, and must not drift when the seed later changes. + +chromium_prefs="/usr/lib/chromium/initial_preferences" +chromium_seed='{"distribution":{"require_eula":false},"browser":{"theme":{"color_scheme":0,"color_scheme2":0}}}' + +if [[ $(cat "$chromium_prefs" 2>/dev/null) != "$chromium_seed" ]]; then + sudo mkdir -p "$(dirname "$chromium_prefs")" + echo "$chromium_seed" | sudo tee "$chromium_prefs" >/dev/null +fi