feat: add noVNC headed mode for interactive browser sessions

- Dockerfile with Xvfb + x11vnc + noVNC for browser-in-a-URL
- search.py auto-detects DISPLAY env to run headed vs headless
- pause_for_human() function for CAPTCHA/login handoff
- Facebook Marketplace search (headed mode only, needs login)
- Updated README with both modes
This commit is contained in:
Ken
2026-05-25 06:56:21 +00:00
parent 290678635e
commit f09317f95b
4 changed files with 168 additions and 11 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/bin/bash
set -e
# Start virtual display
export DISPLAY=:99
Xvfb :99 -screen 0 1280x720x24 -ac &
sleep 1
# Start VNC server on the virtual display (no password, listen on 5900)
x11vnc -display :99 -forever -nopw -listen 0.0.0.0 -rfbport 5900 -shared &
sleep 1
# Start noVNC web proxy (serves browser view at http://localhost:6080/vnc.html)
websockify --web=/usr/share/novnc/ 6080 localhost:5900 &
sleep 1
echo "============================================="
echo " noVNC ready: http://localhost:6080/vnc.html"
echo "============================================="
# Run whatever command was passed (or drop to shell)
if [ $# -eq 0 ]; then
echo "No command given. Container is running -- attach to use."
echo "Run searches with: docker exec car-help uv run python search.py"
tail -f /dev/null
else
exec "$@"
fi