|
[Sponsors] |
[OpenFOAM.com] starting problem on mac: "xhost: command not found" |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 3, 2016, 13:02 |
starting problem on mac: "xhost: command not found"
|
#1 |
New Member
Florida
Join Date: Jun 2015
Posts: 10
Rep Power: 11 |
I followed the installation instruction for OpenFOAM binaries on mac. I followed and completed all the steps and seems all run successfully. Then I got stuck on the following step.
I attempted to run the following command: Merons-MacBook-Pro:~ ban$ ./startOpenFOAM+ And I get the following message that I do not understand? ./startOpenFOAM+: line 8: xhost: command not found of_v3.0_plus bash-4.1$ May be the terminal is expecting me to enter "some command". I don't know what it is expecting or what is wrong. your help is highly appreciated. Thanks, |
|
April 4, 2016, 11:12 |
|
#2 |
Senior Member
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 11 |
Hi..
You have done it right . Enter command blockMesh , to check whether you have openfoam environment set i.e in bash-4.1$ . You can remove line xhost + from startOpenFOAM+ scripts and launch scripts again |
|
April 6, 2016, 23:07 |
|
#3 |
New Member
Florida
Join Date: Jun 2015
Posts: 10
Rep Power: 11 |
I did the following per your suggestion:
I removed the line xhost + from startOpenFOAM+ scripts and launch command again. And then run the command blockMesh at bash-4.1$ terminal and I got the following message: Build : v3.0+-e941ee6c15e9 Exec : blockMesh Date : Apr 07 2016 Time : 01:43:39 Host : "cbd5124db144" PID : 190 Case : /Users/ban nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time --> FOAM FATAL IO ERROR: cannot find file file: /Users/ban/system/controlDict at line 0. From function regIOobject::readStream() in file db/regIOobject/regIOobjectRead.C at line 73. FOAM exiting It appears the blockMesh did not run successfully, however, I went ahead and run the following command: "run" per the installation instruction as follows, and I got the following error message: bash-4.1$ run bash: cd: /home/docker/OpenFOAM/docker-v3.0+/run: No such file or directory Still went ahead and run the following command per the install instruction, and again run to Permission denied problem: bash-4.1$ mkdir -p $FOAM_RUN mkdir: cannot create directory `/home/docker': Permission denied Since the blockMesh command did not run clean. There must be some problem or steps I missed. Please any help is appreciated. Thanks, Azaria |
|
April 7, 2016, 04:41 |
|
#4 |
Senior Member
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 11 |
Hi Azaria
Running BlockMesh was to make sure that you were getting openfoam executables in path . Since you run outside any actual case , it was suppose to throw error. For permission related issue and other see this thread.(see 1April post by pgh) http://www.cfd-online.com/Forums/ope...tml#post593444 |
|
April 7, 2016, 23:38 |
|
#5 |
New Member
Florida
Join Date: Jun 2015
Posts: 10
Rep Power: 11 |
Dear All,
I tried both options but I run to the old problem "Permission Denied". Below is the message I get. Merons-MacBook-Pro:~ ban$ docker-machine ssh default $HOME/installOpenFOAM+ $HOME sh: /Users/ban/installOpenFOAM+: Permission denied exit status 126 My problem circles back to the original problem I started with. Thanks, Azaria |
|
April 8, 2016, 00:09 |
|
#6 |
New Member
Florida
Join Date: Jun 2015
Posts: 10
Rep Power: 11 |
Dear All:
I have comeback to this problem again: Merons-MacBook-Pro:~ ban$ ./startOpenFoam+ of_v3.0_plus bash-4.1$ mkdir -p $FOAM_RUN mkdir: cannot create directory `/home/docker': Permission denied bash-4.1$ I must be missing some thing here. I cannot get past this point. Thanks, Bereket |
|
April 8, 2016, 04:29 |
|
#7 |
Senior Member
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 11 |
Problem : Issue : sh: /Users/ban/installOpenFOAM+: Permission denied exit status 126 i) Make the install script executable chmod +x installOpenFOAM+ ii) mkdir -p $FOAM_RUN . Will not work directly . (Use attached script and follow instruction to install and use openfoam Here is the solution : i) Open the docker terminal via clicking on "Docker Quick Start" short cut . ii) Delete old container: docker rm -f of_v3.0_plus iii)Open installOpenFOAM_MAC scripts (attached here. unzip it before using ) in line 25, replace strings NAME with your user name as appears in mac i.e /Users/Name to /Users/alex assuming alex is user name iv) run installOpenFOAM_MAC script as done earlier i.e docker-machine ssh default $HOME/installOpenFOAM_MAC $HOME v) Now run startOpenFOAM.sh script (http://openfoam.com/download/install-binary.php) and you will be login as root. vi) run following command to login as ofuser su ofuser Always work as ofuser to work on OpenFOAM vii) Go inside the folder /home/ofuser/workingDir and follow following steps a) mkdir OpenFOAM/ofuser-v3.0+/run b) cd .. c)ln -s workingDir/OpenFOAM (creating soft link to OpenFOAM/ofuser-v3.0+) You can copy tutorial in /home/ofuser/workingDir cd /home/ofuser/workingDir cp -ar $FOAM_TUTORIALS/incompressible/icoFoam/cavity . run tutorial Note: Please note that all changes inside container will be lost once you delete the container by command "docker rm -f contName" except content in /home/ofuser/workingDir . So if you are making changes in /opt/OpenFOAM better be careful . |
|
April 8, 2016, 22:17 |
|
#8 |
New Member
Florida
Join Date: Jun 2015
Posts: 10
Rep Power: 11 |
I managed to follow the instruction up until step vi as shown below but again I could not create the "OpenFOAM/ofuser-v3.0+/run" directory. See below the error message
Merons-MacBook-Pro:~ ban$ ./startOpenFOAM+ of_v3.0_plus bash-4.1# su ofuser [ofuser@c00e0cd0d15c ~]$ ls workingDir [ofuser@c00e0cd0d15c ~]$ cd workingDir [ofuser@c00e0cd0d15c workingDir]$ mkdir OpenFOAM/ofuser-v3.0+/run mkdir: cannot create directory `OpenFOAM/ofuser-v3.0+/run': No such file or directory [ofuser@c00e0cd0d15c workingDir]$ mkdir OpenFOAM mkdir: cannot create directory `OpenFOAM': Permission denied [ofuser@c00e0cd0d15c workingDir]$ Your help is appreciated. Thanks, Azaria |
|
April 9, 2016, 07:05 |
|
#9 |
Senior Member
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 11 |
go inside folder
cd /home/ofuser/workingDir and then follow steps. workingDir is same as C:\Users\ban . Even if permission is denied . change permission of folder |
|
April 10, 2016, 15:32 |
|
#10 |
New Member
Florida
Join Date: Jun 2015
Posts: 10
Rep Power: 11 |
I am in the workingDir but still I run into the same problem "Permission Denied". See below:
[ofuser@c00e0cd0d15c workingDir]$ mkdir OpenFOAM mkdir: cannot create directory `OpenFOAM': Permission denied [ofuser@c00e0cd0d15c workingDir]$ The directory has the permission to rwx. See below: [ofuser@c00e0cd0d15c workingDir]$ cd .. [ofuser@c00e0cd0d15c ~]$ ls workingDir [ofuser@c00e0cd0d15c ~]$ ls -l total 0 drwxr-xr-x 1 1000 ftp 1054 Apr 9 00:40 workingDir Can any one tell me why I am having "Permission Denied" error message. I as user have read, write and execute privilege. Thanks, Azaria [ofuser@c00e0cd0d15c ~]$ |
|
April 11, 2016, 05:05 |
|
#11 |
Senior Member
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 11 |
I am assuming , you are inside this directory /home/ofuser/workingDir
and then you are being denied permission . Please do ls -lhtr inside directory. You can login as root (password : 0fuser2015) and change permission of directory chmod 750 workingDir . See if this works for you |
|
May 5, 2016, 22:10 |
Exact Same Problem
|
#12 |
New Member
Evan
Join Date: May 2016
Posts: 23
Rep Power: 10 |
Hey, I am having the exact same problem and am pretty new to programming in general.
I followed your steps verbatim and this is what I got: [root@eba8e7f5a175 workingDir]# whoami root [root@eba8e7f5a175 workingDir]# pwd /home/ofuser/workingDir [root@eba8e7f5a175 workingDir]# chmod 750 workingDir chmod: cannot access `workingDir': No such file or directory [root@eba8e7f5a175 workingDir]# I'm running on el Capitan, my professor is too, and we're both having permissions issues. Any help would be greatly appreciated |
|
May 6, 2016, 09:21 |
|
#13 |
Senior Member
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 11 |
Hi .. use this script and it should work fine .
i)delete old container docker rm -f of_v3.0_plus ii) run new script attached here (unzip the script first) Please place script in home folder and then run command from docker terminal as docker-machine ssh default $HOME/installOpenFOAM+ $HOME It will login as docker user and you can run openfoam and there will be no permission issue Also you can login as root now . password for root : 0fuser2015 Let me know if it works or you face any issue Last edited by pgh; May 6, 2016 at 09:23. Reason: file attached now |
|
May 6, 2016, 09:27 |
|
#14 |
New Member
Evan
Join Date: May 2016
Posts: 23
Rep Power: 10 |
Thats great!
I managed to make a new directory as root, mkdir -p $FOAM_RUN But I am using socat to watch for my DISPLAY variable, and I am unsure of which IP it needs. Is there a command I can type into docker that will show me this? I want to make a variable, export DISPLAY=xxx.xxx.xx.x:x |
|
May 6, 2016, 09:53 |
|
#15 |
Senior Member
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 11 |
i)You do not need root permission to run this command
mkdir -p $FOAM_RUN can you please delete that folder and again run same command as normal user (no root) ii) DISPLAY variable was removed from my script ..Please in line docker run etc as shown below add this variable and rerun the script after deleting the container docker run -ti -d .... -e DISPLAY=${displayVar} --workdir (When you launch docker terminal box , the ip is shown that time . Message read something like this .. "docker is configured to use the default machine with IP 192.169.99.100" " |
|
May 6, 2016, 10:27 |
|
#16 |
New Member
Evan
Join Date: May 2016
Posts: 23
Rep Power: 10 |
Great thanks I just ran the cavity simulation
|
|
May 6, 2016, 10:33 |
|
#17 |
Senior Member
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 11 |
Hi
Can you confirm this do you need to login as root to run command , mkdir -p $FOAM_RUN or you were able run as normal user i.e docker |
|
May 6, 2016, 10:36 |
|
#18 |
New Member
Evan
Join Date: May 2016
Posts: 23
Rep Power: 10 |
Yes this is the last issue I have...
I have to be root. I have made: su ofuser ...but he cannot make that directory. Maybe its an el Capitan issue? |
|
May 6, 2016, 10:37 |
|
#19 |
New Member
Evan
Join Date: May 2016
Posts: 23
Rep Power: 10 |
And likewise the user: docker can't do it either.
|
|
May 6, 2016, 10:43 |
|
#20 |
Senior Member
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 11 |
That's strange..
In my case, i can login as docker user directly . and then can type this command i.e mkdir -p $FOAM_RUN which make OpenFOAM/docker-v3.0+ folder in /C/Users i.e in home directory.. Can you do echo $FOAM_RUN and send the output |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
big difference between clockTime and executionTime | LM4112 | OpenFOAM Running, Solving & CFD | 21 | February 15, 2019 04:05 |
Gmsh installation on terminal help | spitfire | Main CFD Forum | 4 | July 27, 2017 16:11 |
[Other] How to create an MRF zone ? | aminem | OpenFOAM Meshing & Mesh Conversion | 2 | December 8, 2014 11:45 |
injection problem | Mark New | FLUENT | 0 | August 4, 2013 02:30 |
8x icoFoam speed up with Cufflink CUDA solver library | kmooney | OpenFOAM Running, Solving & CFD | 42 | November 6, 2012 12:37 |