CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

[OpenFOAM.com] Cannot connect to X server using docker on OSX

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By federica.gioia
  • 1 Post By pgh

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 16, 2016, 09:16
Default Cannot connect to X server using docker on OSX
  #1
New Member
 
Federica Gioia
Join Date: Mar 2016
Posts: 1
Rep Power: 0
federica.gioia is on a distinguished road
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
I have also installed XQuartz but it doesn't seem to help much!
seuchsy likes this.
federica.gioia is offline   Reply With Quote

Old   March 21, 2016, 05:48
Default
  #2
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 12
rdbisme is on a distinguished road
Quote:
Originally Posted by federica.gioia View Post
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
I have also installed XQuartz but it doesn't seem to help much!
Didn't try myself but a Google Search brought me to:

- fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/
rdbisme is offline   Reply With Quote

Old   March 29, 2016, 07:45
Default
  #3
pgh
Senior Member
 
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 10
pgh is on a distinguished road
I was able to use Quartz to launch paraFoam in Mac but In Mac using XQuartz affect performance of GUI i.e it took long time . It would be better if you install paraview separately and use it . http://www.paraview.org/download/
pgh is offline   Reply With Quote

Old   March 30, 2016, 06:00
Default
  #4
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 12
rdbisme is on a distinguished road
Quote:
Originally Posted by pgh View Post
I was able to use Quartz to launch paraFoam in Mac but In Mac using XQuartz affect performance of GUI i.e it took long time . It would be better if you install paraview separately and use it . http://www.paraview.org/download/
Disclaimer: Never used Docker.


For better performances there's also: x2go. There is a port also on macports, I don't know on Homebrew.

If you can install the server on the Docker it should perform better than X11 forwarding (ssh -X ...)
rdbisme is offline   Reply With Quote

Old   May 7, 2016, 22:19
Default
  #5
New Member
 
LD
Join Date: May 2016
Location: Savannah, GA
Posts: 7
Rep Power: 9
libindaniel2000 is on a distinguished road
Quote:
Originally Posted by pgh View Post
I was able to use Quartz to launch paraFoam in Mac but In Mac using XQuartz affect performance of GUI i.e it took long time . It would be better if you install paraview separately and use it . http://www.paraview.org/download/
I have installed Paraview on my computer and I have docker running openfoam.
How does one go about using paraview with docker?
How do I locate the file I need to open in paraview since the docker files are not visible in Finder?
I can't seem to locate the docker files in Finder. When I open Paraview, what file should I be opening?

This answers seems to help: http://stackoverflow.com/questions/3...n-os-x-part-ii

But, I am still not sure how to go about getting the cd function to work to get me to the folder.

Scenario 1:
When I type open -a paraview foam.foam within the docker shell, I still get the error:
bash: open: command not found

Scenario 2:
When I open a new terminal tab and type in the commands from the website, I get this error:
"ERROR: In /Users/kitware/buildbot-slave/paraview-bigmac-osx-shared-release_opengl2_osx10_7_qt4_superbuild/build/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 8483
vtkPOpenFOAMReader (0x7ff5ae360a50): /Users/LibinDaniel/foam.foam contains no timestep data.


ERROR: In /Users/kitware/buildbot-slave/paraview-bigmac-osx-shared-release_opengl2_osx10_7_qt4_superbuild/build/paraview/src/paraview/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 784
vtkPVCompositeDataPipeline (0x7ff5ae3679a0): Algorithm vtkPOpenFOAMReader(0x7ff5ae360a50) returned failure for request: vtkInformation (0x7ff5ae369b30)
Debug: Off
Modified Time: 191113
Reference Count: 1
Registered Events: (none)
Request: REQUEST_INFORMATION
FORWARD_DIRECTION: 0
ALGORITHM_AFTER_FORWARD: 1"

Last edited by libindaniel2000; May 8, 2016 at 15:03.
libindaniel2000 is offline   Reply With Quote

Old   May 9, 2016, 05:02
Default
  #6
pgh
Senior Member
 
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 10
pgh is on a distinguished road
Hi..

1.Scenario 1: is not good for you.

2. You need to create foam.foam file inside the testcase that you are runnning .
See below explanation

Looks OpenFOAM is for running the case i.e meshing and doing simulation . Paraview is for post-processing . You need to run case in via docker terminal box i.e OpenFOAM via docker terminal box only.

Lets suppose you copied
mkdir -p $FOAM_RUN
run
cp -r $FOAM_TUTORIALS/incompressible/icoFoam/cavity .
cd cavity
blockMesh
icoFoam

This will create a folder with name OpenFOAM in your home directory i.e /Users/daniel (assuming daniel is your username ) . Go inside the folder docker-v3.0+(if you are using latest script that i have provided) and then inside run directory and your cavity folder is in same location. When you launch paraview , you need to browse to this folder and open a.foam (i.e assuming your created a.foam file using command touch a.foam inside the cavity folder.)

Note:I added new script which can be found in this link (name of script is installOpenFOAM_MAC_pgh.gz which help in resolving some issue related to file read/write permission in MAC
http://www.cfd-online.com/Forums/ope...not-found.html
libindaniel2000 likes this.
pgh is offline   Reply With Quote

Old   May 9, 2016, 17:46
Default
  #7
New Member
 
LD
Join Date: May 2016
Location: Savannah, GA
Posts: 7
Rep Power: 9
libindaniel2000 is on a distinguished road
Quote:
Originally Posted by pgh View Post
Hi..

1.Scenario 1: is not good for you.

2. You need to create foam.foam file inside the testcase that you are runnning .
See below explanation

Looks OpenFOAM is for running the case i.e meshing and doing simulation . Paraview is for post-processing . You need to run case in via docker terminal box i.e OpenFOAM via docker terminal box only.

Lets suppose you copied
mkdir -p $FOAM_RUN
run
cp -r $FOAM_TUTORIALS/incompressible/icoFoam/cavity .
cd cavity
blockMesh
icoFoam

This will create a folder with name OpenFOAM in your home directory i.e /Users/daniel (assuming daniel is your username ) . Go inside the folder docker-v3.0+(if you are using latest script that i have provided) and then inside run directory and your cavity folder is in same location. When you launch paraview , you need to browse to this folder and open a.foam (i.e assuming your created a.foam file using command touch a.foam inside the cavity folder.)

Note:I added new script which can be found in this link (name of script is installOpenFOAM_MAC_pgh.gz which help in resolving some issue related to file read/write permission in MAC
http://www.cfd-online.com/Forums/ope...not-found.html
Thank you for that explanation. I didn't realize that I need to look for OpenFOAM folder. I kept looking for FOAM_RUN folder. Thank you. This helps a lot!
libindaniel2000 is offline   Reply With Quote

Old   November 1, 2016, 22:10
Default [OS X Yosemite 10.10.5] [docker]Cannot connect to X server
  #8
New Member
 
Siyu Chen
Join Date: Sep 2016
Location: Houghton, USA
Posts: 7
Rep Power: 9
seuchsy is on a distinguished road
Hi pgh,
I am a beginner to OpenFOAM. How to open paraView through docker?

For now, I don't find the direct solution. What I did is create a new "test.foam" file in the same folder, and open it using paraView. But is there a way that I can just use "paraFoam" to open the paraView?

Thanks.

Siyu

Quote:
Originally Posted by pgh View Post
I was able to use Quartz to launch paraFoam in Mac but In Mac using XQuartz affect performance of GUI i.e it took long time . It would be better if you install paraview separately and use it . http://www.paraview.org/download/
seuchsy is offline   Reply With Quote

Old   November 2, 2016, 03:47
Default
  #9
pgh
Senior Member
 
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 10
pgh is on a distinguished road
hi Siyu

Right now , in Mac , we suggest to use paraview . . paraFoam is same as paraview but has some additional capability . Since you are beginner , i think it should not make much difference to you
To use paraFoam is mac, right now is a bit complicated and graphics wise experience is not good .

Thanks
Pawan
pgh is offline   Reply With Quote

Old   November 2, 2016, 07:25
Default
  #10
New Member
 
Siyu Chen
Join Date: Sep 2016
Location: Houghton, USA
Posts: 7
Rep Power: 9
seuchsy is on a distinguished road
Thanks Pawan!

Quote:
Originally Posted by pgh View Post
hi Siyu

Right now , in Mac , we suggest to use paraview . . paraFoam is same as paraview but has some additional capability . Since you are beginner , i think it should not make much difference to you
To use paraFoam is mac, right now is a bit complicated and graphics wise experience is not good .

Thanks
Pawan
seuchsy is offline   Reply With Quote

Old   October 13, 2021, 04:51
Default ParaView Opening Error Mac ( docker)
  #11
New Member
 
zink
Join Date: Oct 2015
Posts: 29
Rep Power: 10
ansab_sindhu is on a distinguished road
Hi,

I am using macOS Big Sur v.11.4 and using docker to run openFOAM v1906. However, when I type paraFoam in the bash, the following error appears.
OpenFOAM is running fine but I cannot load ParaVEW. I have preview running spepratley file. But I cannot load my case. Any help in this regard will be highly appreciated.

QXcbConnection: Could not connect to display host.docker.internal:0.
Aborted

Regards,
ansab_sindhu is offline   Reply With Quote

Old   October 13, 2021, 14:31
Default
  #12
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
If you use a newer openfoam-docker starter
specifying the '-X' option should do.
https://develop.openfoam.com/packagi...penfoam-docker

However you should be using a native (osx) version of paraview and not be using 'paraFoam' with docker
olesen is offline   Reply With Quote

Reply

Tags
docker-toolbox, osx, paraview, xquartz


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.com] Docker vs Not Docker v2 AND installing editors into Docker u2berggeist OpenFOAM Installation 1 July 10, 2018 02:58
error: connect failed destroy FLUENT 7 March 18, 2018 14:59
[OpenFOAM.com] v1606+ Install pb with Docker on OSX El Capitan BPich OpenFOAM Installation 3 October 10, 2016 18:52
[OpenFOAM.org] A Mac OS X of23x Development Environment Using Docker rt08 OpenFOAM Installation 1 February 28, 2016 19:00
[General] Mac Os x system can't connect to X server when using ssh to access Linux system Ivy Zhou ParaView 2 September 30, 2013 10:21


All times are GMT -4. The time now is 11:06.