Skip to content

XQuartz

Docker with XQuartz

IP_ADDRESS=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')
DISPLAY_INDEX=0

open -a XQuartz
xhost + $IP_ADDRESS

docker run --rm -it -e DISPLAY=$IP_ADDRESS:$DISPLAY_INDEX -v /tmp/.X11-unix:/tmp/.X11-unix  ...

Troubleshooting

OSX XQuartz 보안 연결

In XQuartz preference, go to "Security" and check "Allow connections from network clients"

See also