fixed chromium script

This commit is contained in:
[yuri]
2025-12-11 10:57:35 +01:00
parent 25722a7608
commit 825a4cf771

View File

@@ -128,18 +128,24 @@ else
fi
# allow Chromium login with Google Account
if [[ -f ~/.config/chromium-flags.conf ]]; then
CONF=~/.config/chromium-flags.conf
grep -qxF -- "--oauth2-client-id=77185425430.apps.googleusercontent.com" "$CONF" ||
# Define the configuration file path
CONF="$HOME/.config/chromium-flags.conf"
# Check if the file exists, or create it if it doesn't
if [[ ! -f "$CONF" ]]; then
# Create the file if it doesn't exist
touch "$CONF"
echo "Created new Chromium flags file: $CONF"
fi
# Add the OAuth 2.0 Client ID if it's not already there
# -q: quiet, -x: match whole line, -F: literal string match
grep -qxF -- "--oauth2-client-id=77185425430.apps.googleusercontent.com" "$CONF" || \
echo "--oauth2-client-id=77185425430.apps.googleusercontent.com" >>"$CONF"
grep -qxF -- "--oauth2-client-secret=OTJgUOQcT7lO7GsGZq2G4IlT" "$CONF" ||
# Add the OAuth 2.0 Client Secret if it's not already there
grep -qxF -- "--oauth2-client-secret=OTJgUOQcT7lO7GsGZq2G4IlT" "$CONF" || \
echo "--oauth2-client-secret=OTJgUOQcT7lO7GsGZq2G4IlT" >>"$CONF"
echo "Now you can login to your Google Account in Chromium."
fi
say_green "Chromium flags for Google Account login have been configured."
# Enable basic services
#sudo systemctl enable chronyd.service