Cannot connect to X server using docker on OS X - Part II

与世无争的帅哥 提交于 2019-12-08 03:51:02

问题


I'm having the same difficulty as the one expressed here: Cannot connect to X server using docker on OSX

I'm very confused about the recommended instructions in the above link (I'm a novice on docker), and I'm hoping to get clarification about the following:

1) Do we "touch foo.foam" in a regular OS X terminal or do we touch it in the docker terminal; in my case, following "docker run -ti openfoamplus/of_v30plus_rhel66 /bin/bash"

2) You suggest running paraview (mine is the most recent) just like any other Mac app. So, basically, to double-click on paraview in the Applications folder? But when opening foo.foam via the Open Menu do we just open foo.foam and press the Apply button (it gives errors), or do we actually enter "paraview foo.foam" as per your instruction above? If the latter, then nothing really happens; I can't open anything!

3) If we're supposed to just open foo.foam, what do we do after that? How is docker even aware about any of this? Anyway, when I type paraview from within docker (after foo.foam is opened) I get the same X server error. I wouldn't expect otherwise!

Hopefully, you can provide a more step-by-step set of instructions?

Thanks in advance


回答1:


First steps with OpenFoam

You've successfully followed the instructions to run the cavity problem, but you run the final command paraview and the spits back an error about x server being unavailable.

here's what you do:

Download paraview nativly to your mac. Then open up a terminal window and cd into the directory that you ran the cavity problem in. (note sure what directory? jump back to your docker shell and run echo $FOAM_RUN)

Once you're inside the cavity directory, make a new .foam file and open it with paraview.

$ touch foam.foam
$ open -a paraview foam.foam 

Click on that Apply button - middle of the screen on the left. At the top screen you can then select things like pressure p and plot type surface, and step through the time dumps in the upper right (initially my mesh didn't render correctly, so I had to deselect internalMesh, apply, and then select it and apply again).

Not really sure what you're looking at? Here's the tutorial for the problem:
http://www.openfoam.com/documentation/user-guide/cavity.php#x5-40002.1



来源:https://stackoverflow.com/questions/36497771/cannot-connect-to-x-server-using-docker-on-os-x-part-ii

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!