无法在OSX上使用Docker连接到X服务器

问题描述:

我正在尝试在Mac OS X 10.10.5上安装openFoam( http://www.openfoam.com/download/install-binary.php ),使用Docker-toolbox. 我可以毫无问题地完成所有建议的步骤,但是,当我尝试运行安装指南中包含的示例时,由于它返回以下错误,因此无法打开paraFoam:

I am trying to install openFoam on Mac OS X 10.10.5 (http://www.openfoam.com/download/install-binary.php) by using Docker-toolbox. I can do without problems all the suggested steps, but then, when I try to run the example included in the installation guide, I cannot open paraFoam, since it returns the following error:

paraview: cannot connect to X server

我还安装了XQuartz,但似乎并没有太大帮助!

I have also installed XQuartz but it doesn't seem to help much!

为什么不获取最新的paraview (来自Kitware).它具有内置的本机OpenFOAM阅读器,我经常使用.您唯一要做的就是不用打电话

Why don't you get the latest paraview from Kitware. It has a native OpenFOAM reader built-in, which I always use. The only thing you have to do, instead of calling

paraFoam

用于创建扩展名为foam的空文件.像这样:

is to create an empty file with a foam extension. Like so:

touch foo.foam

然后,您可以像运行其他Mac应用程序一样运行start paraview,浏览至相应的case目录,然后打开"空的foo.foam文件:

Then you can run start paraview like any other mac application, browse to to the respective case-directory and "open" the empty foo.foam file:

paraview foo.foam

如果要在命令行中使用类似于paraFoamparaview的命令,请使用命令行更改为Paraview.app并找到实际可执行文件paraview.创建一个指向该可执行文件的符号链接.之所以这样做,是因为我喜欢使用最新的paraview而不是OpenFOAM提供的版本.

If you would like to use a command similar to paraFoam or paraview in the command line, then use your command line to change into the Paraview.app and find paraview, which is the actual executable. Create a symbolic link pointing to that executable. I do the same, since I like to use the latest paraview instead of the one provided with OpenFOAM.