Anurag commited on
Commit
ebe201c
·
unverified ·
2 Parent(s): df97c33e0b68c7

Merge branch 'edit' into codex/update-start.sh-and-env-builder.js

Browse files
Files changed (1) hide show
  1. start.sh +14 -2
start.sh CHANGED
@@ -520,8 +520,10 @@ for candidate in \
520
  /usr/bin/chromium-browser \
521
  /snap/bin/chromium; do
522
  if [ -x "$candidate" ]; then
523
- BROWSER_EXECUTABLE_PATH="$candidate"
524
- break
 
 
525
  fi
526
  done
527
  if [ -z "$BROWSER_EXECUTABLE_PATH" ]; then
@@ -1685,6 +1687,16 @@ while true; do
1685
  # 11. Start WhatsApp Guardian after the gateway is accepting connections
1686
  start_guardian_once
1687
 
 
 
 
 
 
 
 
 
 
 
1688
  # 11.5 Warm up the managed browser so first browser actions have a live tab
1689
  warmup_browser
1690
 
 
520
  /usr/bin/chromium-browser \
521
  /snap/bin/chromium; do
522
  if [ -x "$candidate" ]; then
523
+ if file "$candidate" 2>/dev/null | grep -q "ELF"; then
524
+ BROWSER_EXECUTABLE_PATH="$candidate"
525
+ break
526
+ fi
527
  fi
528
  done
529
  if [ -z "$BROWSER_EXECUTABLE_PATH" ]; then
 
1687
  # 11. Start WhatsApp Guardian after the gateway is accepting connections
1688
  start_guardian_once
1689
 
1690
+ # ── Silence D-Bus errors for headless Chromium ──
1691
+ if [ -z "${DBUS_SESSION_BUS_ADDRESS:-}" ]; then
1692
+ if command -v dbus-launch >/dev/null 2>&1; then
1693
+ eval "$(dbus-launch --sh-syntax 2>/dev/null)" || true
1694
+ export DBUS_SESSION_BUS_ADDRESS="${DBUS_SESSION_BUS_ADDRESS:-disabled:}"
1695
+ else
1696
+ export DBUS_SESSION_BUS_ADDRESS="disabled:"
1697
+ fi
1698
+ fi
1699
+
1700
  # 11.5 Warm up the managed browser so first browser actions have a live tab
1701
  warmup_browser
1702