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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -