Merge pull request #8203 from hjanuschka/fix-chromium-first-run-eula
Skip Chromium's new first-run EULA
This commit is contained in:
@@ -1328,7 +1328,7 @@ apply_system_transition() {
|
|||||||
'
|
'
|
||||||
fi
|
fi
|
||||||
as_root install -d -m 0755 /usr/lib/chromium
|
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
|
as_root tee /usr/lib/chromium/initial_preferences >/dev/null
|
||||||
|
|
||||||
# Deliberately do NOT add the user to the docker group. That group is
|
# Deliberately do NOT add the user to the docker group. That group is
|
||||||
|
|||||||
@@ -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
|
/usr/share/icons/Yaru/scalable/actions/go-next-symbolic.svg
|
||||||
gtk-update-icon-cache /usr/share/icons/Yaru &>/dev/null || true
|
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
|
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
|
/usr/lib/chromium/initial_preferences
|
||||||
|
|||||||
@@ -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
|
||||||
Reference in New Issue
Block a user