xvfb-chrome
Installation
SKILL.md
XVFB + Chrome 浏览器自动化
在无GUI的Linux服务器上运行Chrome浏览器的完整指南,支持配合 chrome-devtools MCP 使用。
模式选择
| 场景 | 推荐方式 |
|---|---|
| 快速爬取、截图、自动化脚本 | --headless=new (无头) |
| 需要调试/连接DevTools MCP | xvfb-run + 非无头 + --remote-debugging-port=9222 |
| 需要看到浏览器窗口(VNC截图等) | xvfb-run + 非无头 |
启动命令
1. 无头模式 (常规自动化)
google-chrome --headless=new --no-sandbox --disable-gpu --user-data-dir=/tmp/chrome-data