#!/bin/bash
# Probe environment: existing chrome, displays, ports
echo "=== DISPLAYS (Xvfb) ==="
pgrep -a Xvfb || echo "no Xvfb"
echo "=== existing chrome procs ==="
pgrep -af chrome | head -40 || echo "no chrome"
echo "=== port 9222 ==="
curl -s http://localhost:9222/json/version || echo "9222 not up"
echo ""
echo "=== port 9223 ==="
curl -s http://localhost:9223/json/version || echo "9223 not up"
echo ""
echo "=== chrome binary ==="
which google-chrome google-chrome-stable chromium chromium-browser 2>/dev/null
echo "=== x11vnc/novnc ==="
pgrep -af x11vnc | head -5 || echo "no x11vnc"
echo "=== python websocket ==="
python3 -c "import websocket; print('websocket-client', websocket.__version__)"
echo "=== DONE PROBE ==="
