Open hopewise opened 6 years ago
it's the XWindow protocol not mismatch, for me I I run Linux as the main developer OS only, on Mac hardware and other PC laptops, I like the Mac hardware only not its OSX, have no idea how to make that DISPLAY
work with the XWindow protocol;
https://github.com/c0b/docker-elixir/wiki/use-observer <= this is how do I make it working, I believe the
XWindow protocol's DISPLAY
is something like DISPLAY=<hostname>:X.Y
not sure what are the proprietary changes made by the OSX;
you may continue research with your solution to make it natively working, or one possible direction is to have a VNC Server running on mac-os , most VNC Server do have the XWindow compliant DISPLAY https://apple.stackexchange.com/questions/303647/vnc-server-for-mac-os
That $DISPLAY
path is not available in container, since you don't mount that. The docker container has access to host network interface (with --net host
), but not file system.
I'm not expert on this, but following works for me:
# run XQuartz
# check XQuartz => Preferences => Security => Allow connections from network clients
# restart XQuartz
xhost + 127.0.0.1
docker run \
-it \
--rm \
-e DISPLAY=host.docker.internal:0 \
elixir:latest iex -e ":observer.start()"
Links
--
Update: please run the commands in X11 terminal
@hopewise can confirm that? then we may add a section into the wiki page, and a link to the README.md
yes, it did not work for me
The solution proposed by @chulkilee is actually working, however, please note that you have to run everything through the X11 terminal:
It's also possible through tunneling which can be done without X11
You need to make a tunnel through port 4369 and the port in epmd -names
If the server is using full name you need to set that dns on your local machine on 127.0.0.1
erl -name debug@node.example.com -setcookie OURERLANGCOOKIE -run observer
Then in the observer menu switch to that node.
I run phoenix server into container at Mac, I run the container as:
then, when I start phoenix as:
I got error when try to run
:observer.start
:inside container:
Any idea?