Mac Errors



Please check whether you have completed all of the steps carefully for ROS setup and that you have setup X-forwarding with xQuartz

Unable to open display “host.docker.internal:0”

Solution 0: Did you install everything?

  1. Did you install homebrew?

    homebrew installation guide

  2. Did you install docker?

    Download with Homebrew

     brew install docker

    It is also nice to install the Desktop app itself:

    Docker download

    You might want to make a docker account and select the free plan

  3. Did you install xQuartz?

    Download with Homebrew:

     brew install --cask xquartz

    Download Online:

    xquartz download

  4. Did you install xeyes?

    xeyes is command that can test whether you have configured your environment.

    Note: You need to install macports to run it (see below).

     sudo port install xeyes

    Run the following command to see a pair of eyes following your cursor!


    If it does not work, it means that your setup is broken.

  5. (Optional) Did you install macports?

    Macport installation guide: Macport guide

Solution 1: Did you configure xQuartz, xhost and Docker?

  1. Check if you installed xquartz in solution 0

  2. open xquartz through terminal with
     open -a XQuartz
  3. Go to x11 preferences and security, and make both checkmarks are selected: XQuartz Setting

  4. Restart your Mac
     sudo shutdown -r now
  5. After restarting, start up xQuartz with
     open -a XQuartz
  6. Start xhost with
  7. Continue with the guide!

Solution 2: Did you set your Display IP address?

  1. Attach your local ip address to xhost:

If this doesnt work:

  1. Get your local ip address with
     ifconfig en0 | grep inet | awk '$1=="inet" {print $2}
  2. Attach the result to xhost:
  3. Continue with the guide!

Solution 3: Manually set the display:

  1. Set the display with
  2. initialize xhost:
  3. open xhost ports:
     xhost +
  4. try steps 1 to 3 with your ip address from Solution 2 Use the following command in step 1:
  5. Continue to follow the guide!

Solution 4: Try combination of Solution 2 and 3:

  1. Use the commands in a different order, after starting xquartz and docker xhost debug example

Solution 5: add x11 server through Mac Ports:

  1. If you don’t have macport installed:

    Macport installation guide: Macport guide

  2. Install x11 server through:
     sudo port install xorg-server
  3. Continue to follow the guide or try Solutions 1-4!

Medium Article Guide

Oracle Archives Guide

Legendary Stack Overflow Answer #1

Legendary Stack Overflow Answer #2