![]() Note that xinit does work for some reason: $ xinit MacBook-Pro:opencv-gui csaftoiu$ DISPLAY=`ipconfig getifaddr en0`:0 xterm Xterm: Xt error: Can't open display: 127.0.0.1:0 MacBook-Pro:opencv-gui csaftoiu$ DISPLAY=127.0.0.1:0 xterm The following do not work though, not sure why based on the answer here: xterm: Xt error: Can't open display: localhost:0 This value works from a regular OSX too: $ DISPLAY=:0 xterm Srw-rw-rw- 1 csaftoiu wheel 0B May 6 21:12 /private/tmp/.3wncZULdXC/:0 MacBook-Pro:opencv-gui csaftoiu$ ls -alh $DISPLAY The pseudo-file exists, though: MacBook-Pro:opencv-gui csaftoiu$ echo $DISPLAY Xterm: Xt error: Can't open display: /private/tmp/.3wncZULdXC/:0 Testing it out, if I try to open an xterm, it does not work: MacBook-Pro:opencv-gui csaftoiu$ xterm I've installed it via homebrew, via brew cask install xquartz. I believe my question may be answered by just the first part, but just in case (to avoid the XY problem), I've provided the second part as well. I'm attempting to get XQuartz to work on OSX so I can do X11 forwarding via Docker. I needed to quit Terminal and then relaunch it in order to get it to work. $ docker run -e DISPLAY=.internal:0 batmat/docker-eclipse ![]() Profit and run more apps $ docker run -e DISPLAY=.internal:0 jess/tor-browser I noticed that at this point XQuartz is opened on it own to the same port $ lsof -i TCP:6000 $ docker run -ti -rm -e DISPLAY=.internal:0 eyes Just using the -e DISPLAY=.internal:0 did the trick, as it it will point to the internal IP address and provide that to the docker image. The magic happens using the variables from Docker. $ docker build -t eyes -f Dockerfile.eyes. RUN rm -rf /tmp/* /usr/share/doc/* /usr/share/info/* /var/tmp/*ĮNTRYPOINT \"", "xeyes"] RUN apt-get update
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |