![]() ![]() If you are a Linux or Mac user, usually youd have X11-forwarding. ![]() I tested this with XQuartz 2.7.11 and Docker Desktop 2.1.0.2 on macOS Mojave (10.14.6). To get this to work you basically need an X11 server running on your local workstation. Doing it this way I didn't need to mount /tmp/.X11-unix when calling docker run.Now that you have logged in, check the DISPLAY variable to make. If you quit XQuartz, you must re-auth with xhost after starting it again (the permission doesn't "stick"). Now connect to a remote server by using the -X option which will do X11 forwarding for SSH.At least for me, ctrl + c does not shutdown the container I need to close the X11 window manually.You can use the special identifier with docker run:.You can expose 127.0.0.1 instead of looking up your local IP (caveat emptor: I'm not an expert on the implications of this setting): $ xhost + 127.0.0.1ġ27.0.0.1 being added to access control list.Some extra things I discovered along the way: This other discussion has more info: Running Chromium inside Docker - Gtk: cannot open display: :0 Additional findings Just be careful and understand the consequences of too permissive a rule. cannot connect to X server 10.0.0.131:0Īfter installing XQuartz you will need to restart your computer as horcle_buzz suggested starting a new terminal session is not enough.Īfter a reboot you can grant access for whatever you need using the xhost command. In my particular container, I get this error. Inside sshconfig, remove the hash in the lines ForwardAgent, ForwardX11, ForwardX11Trusted, and set the corresponding arguments to yes. Third Edit sshconfig as administrator (USE sudo ). In the end, all guides I'm reading says I should run my container like this: docker run -e DISPLAY=$MY_IP_ADDRESS:0 -v /tmp/.X11-unix:/tmp/.X11-unix DOCKER_IMAGE sudo apt install ssh xauth xorg Second Go to the folder contains sshconfig file, mine is /etc/ssh. Then I am supposed to run xhost + $MY_IP_ADDRESS in my bash shell, but all I get is this error: xhost: unable to open display "" In the XQuartz Preferences -> Security tab, I enable "Allow connections from network clients". □ xquartz staged at '/usr/local/Caskroom/xquartz/2.7.9' (73M) => installer: The install was successful. => installer: Package name is XQuartz 2.7.9 => Package installers may write to any location options such as -appdir are ignored. => Running installer for xquartz your password may be necessary. Using Docker for Mac 1.12 (stable) and OS X 10.11.5 (15F34), I'm attempting to make one of my containers forward to X11.įirst, I install XQuartz from my bash shell: $ brew cask install xquartz ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |