python - Trying to use TkInter with Socat in Docker - Mac -


here's steps..

installing socat , xquartz

brew install socat brew cask install xquartz 

opening xquartz setting socat listener

open -a xquartz socat tcp-listen:6000,reuseaddr,fork unix-client:\"$display\" 

running docker container display environmental variable

docker run -e display=192.168.0.13:0 tkinter sh 

here's error i'm receiving.

// container

_tkinter.tclerror: couldn't connect display "192.168.0.13:0"

// socat

socat[37688] e connect(8, len=2 af=1 "", 2): invalid argument

any other ip address gives me similar error doesn't show in socat can assume ip correct.

any suggestion appreciated.

are trying run gui app within docker? have seen this method?

after open xquartz have allow connections network clients. know on linux have share .x11 volume , enable xhost , looks on mac have same:

ip=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}') xhost + $ip docker run -d --name displaycontainer -e display=$ip:0 -v /tmp/.x11-unix:/tmp/.x11-unix <yourrepo>/<yourimage> 

Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -