On Modelica Language Discord, someone posted the commands to get the OpenModelica GUI (OMEdit) running on Linux:
xhost +"local:docker@"
docker run -ti --rm --privileged --net=host -e "DISPLAY=$DISPLAY" -v /tmp/.X11-unix:/tmp/.X11-unix openmodelica/openmodelica:v1.14.1-gui OMEdit
and someone else posted the below command for macOS:
docker run -ti --rm --privileged --net=host -e DISPLAY=docker.for.mac.localhost:0 -v /tmp/.X11-unix:/tmp/.X11-unix openmodelica/openmodelica:v1.14.1-gui OMEdit
I have installed Docker using HomeBrew following the instructions here
docker --version Docker version 19.03.8, build afacb8b
but when trying the command above I get the error message:
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root' qt.qpa.screen: QXcbConnection: Could not connect to display docker.for.mac.localhost:0 Could not connect to any X display.
Things I have tried to solve the problem:
non-network local connections being added to access control list
qt.qpa.screen: QXcbConnection: Could not connect to display unix/private/tmp/com.apple.launchd.lO0ZFXT603/org.macosforge.xquartz:0
- from here, I tried
IP=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')
docker run .... -e DISPLAY=$(xhost + $(hostname) > /dev/null; echo $IP):0 ...
leading to
qt.qpa.screen: QXcbConnection: Could not connect to display 10.0.0.9:0
- from here, I tried the
open -a XQuartz
, ...xhost + $ip
, andDISPLAY=$ip:0
I would appreciate if you could help me know
- How can I resolve the above issues and get the GUI running
- breakdown down the above commands for me. some of them are explained here, but not the rest.
P.S. I don't want to install Docker Desktop as discussed here.