You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Mac下使用Docker运行Splash Live Webkit窗口失败求助

Fixing Splash Live Webkit Window Issue on Mac with Docker

Hey there! I totally get the frustration when Linux-focused docs don't work smoothly on Mac—especially when you're new to Docker. Let's walk through how to get that Live Webkit window up and running properly.

The Core Issue

On Linux, Docker can directly access the host's X11 display system, but Mac uses a virtualized Docker environment plus its own display system. We need to route Splash's GUI output to Mac's X11 server (XQuartz) instead of relying on Linux-specific setup.

Step-by-Step Solution

  1. Install XQuartz (Mac's X11 Server)
    XQuartz acts as the bridge for Docker containers to render GUI apps on your Mac. You can install it easily via Homebrew:

    brew install --cask xquartz
    

    After installing, open XQuartz, head to Preferences > Security, check the box for "Allow connections from network clients", then restart XQuartz to apply the setting.

  2. Get Your Mac's Local IP Address
    Docker needs this IP to connect to XQuartz. Run this command in Terminal to grab it:

    ipconfig getifaddr en0
    

    (Use en1 instead if you're connected via Ethernet.) Note down the output (e.g., 192.168.1.105).

  3. Authorize XQuartz to Accept Docker Connections
    Grant your Mac's IP access to XQuartz with this one-liner (it auto-fetches your IP so you don't have to type it):

    xhost + $(ipconfig getifaddr en0)
    
  4. Run Splash with the Mac-Specific Docker Command
    Replace the Linux-focused command from the docs with this adjusted version (swap in your IP if the auto-command didn't work):

    docker run -p 8050:8050 -e DISPLAY=192.168.1.105:0 scrapinghub/splash
    

    The DISPLAY variable tells Splash exactly where to send the Live Webkit window output—your Mac's XQuartz instance.

Quick Troubleshooting Tips

  • If the window still doesn't appear, double-check that XQuartz is running and the "Allow network clients" setting is enabled.
  • If you switch networks (e.g., home Wi-Fi to office), re-run the xhost + command to update the authorized IP.
  • Ensure your Mac's firewall isn't blocking incoming connections to XQuartz.

内容的提问来源于stack exchange,提问作者Emiliano Isaza Villamizar

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 09:04:56