Files
javis_bot/docker/run-chrome.sh
javis-bot 247edda3eb fix: google anti-bot flag + persistent/safe settings apply + TTS engine wiring
- Chrome: --disable-blink-features=AutomationControlled (+ ko-KR) so Google
  shows results, not the /sorry/ automation block.
- Settings persist to /data/jarvis-settings.json (survives recreate; entrypoint
  re-merges it) AND the runtime config; apply restarts via a DETACHED process so
  the HTTP response isn't dropped when the bridge restarts.
- Bridge reads tts_engine from the settings config so the TTS-engine choice
  actually applies.
2026-06-15 13:13:11 +09:00

29 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Wait for the desktop, then launch Chrome on :1 so the VNC screen shows a
# controllable browser (jarvis can also drive it). Runs as root -> --no-sandbox.
set -e
for i in $(seq 1 40); do
xdpyinfo -display :1 >/dev/null 2>&1 && break
sleep 1
done
sleep 3
export DISPLAY=:1
# --remote-debugging-port exposes CDP so the brain's browse-search.mjs
# (playwright connectOverCDP) can drive this on-screen Chrome for the
# broadcast-visible Google/YouTube search. Bound to loopback (same container).
exec google-chrome \
--no-sandbox --no-first-run --disable-dev-shm-usage \
--test-type \
--disable-blink-features=AutomationControlled \
--disable-features=AutomationControlled \
--lang=ko-KR \
--disable-infobars \
--no-default-browser-check \
--disable-translate \
--disable-features=Translate,TranslateUI,InfoBars \
--remote-debugging-port="${CDP_PORT:-9222}" \
--remote-debugging-address="${CDP_BIND:-127.0.0.1}" \
--user-data-dir="${CHROME_PROFILE_DIR:-/root/chrome-profile}" \
--password-store=basic --start-maximized \
"${CHROME_START_URL:-about:blank}"