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

[OpenFOAM.com] starting problem on mac: "xhost: command not found"

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 6, 2016, 09:51
Default
  #21
New Member
 
Evan
Join Date: May 2016
Posts: 23
Rep Power: 9
k13113y is on a distinguished road
[root@eba8e7f5a175 cavity]# echo $FOAM_RUN
/root/OpenFOAM/ofuser-v3.0+/run

[ofuser@eba8e7f5a175 cavity]$ echo $FOAM_RUN
/home/ofuser/OpenFOAM/ofuser-v3.0+/run

...It worked? I'm sorry for the confusion I literally don't know why its working all of a sudden.
k13113y is offline   Reply With Quote

Old   May 6, 2016, 09:54
Default
  #22
New Member
 
Evan
Join Date: May 2016
Posts: 23
Rep Power: 9
k13113y is on a distinguished road
It seems to have happened when I downloaded the new version of virtual box
k13113y is offline   Reply With Quote

Old   May 6, 2016, 10:08
Default
  #23
pgh
Senior Member
 
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 10
pgh is on a distinguished road
Launch docker terminal box i)delete old container by running following command "docker rm -f of_v3.0_plus"

ii) run this command "docker ps -a " to see there is no container now

iii) unzip the latest script that i have provided and put in /C/Users
and use this command
docker-machine ssh default $HOME/installOpenFOAM_MAC_pgh $HOME

You will be login as docker (There is no ofuser involved in it)
then follow rest of instruction
Attached Files
File Type: gz installOpenFOAM_MAC_pgh.gz (684 Bytes, 17 views)
pgh is offline   Reply With Quote

Old   May 6, 2016, 10:41
Default
  #24
New Member
 
Evan
Join Date: May 2016
Posts: 23
Rep Power: 9
k13113y is on a distinguished road
Here's what happened when I followed your last comment.

taylor:~ myusername$ ./startOpenFoam+_MAC
of_v3.0_plus
bash-4.1$ whoami
whoami: cannot find name for user ID 1000
bash-4.1$ mkdir -p $FOAM_RUN
bash-4.1$ run

//so it was able to make the directory

bash-4.1$ export DISPLAY=my.ip
bash-4.1$ export LIBGL_ALWAYS_INDIRECT=y
bash-4.1$ paraFoam
Created temporary 'cavity.OpenFOAM'
paraview: cannot connect to X server my.ip

But it couldn't open the graphical interface like before for some reason
k13113y is offline   Reply With Quote

Old   May 6, 2016, 10:49
Default
  #25
pgh
Senior Member
 
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 10
pgh is on a distinguished road
I am not using paraFOAM from docker container. I will suggest to download paraview seprately for MAC and then work on it .

http://www.paraview.org/download/

Also did you add display variable as suggested earlier in your command i.e in script (Note just need to add -e DISPLAY=${displayVar} in script . and rerun it after deleting old container

docker run -ti .... -e DISPLAY=${displayVar} --workdir
pgh is offline   Reply With Quote

Old   May 6, 2016, 11:14
Default
  #26
New Member
 
Evan
Join Date: May 2016
Posts: 23
Rep Power: 9
k13113y is on a distinguished road
I've now installed paraview and made the change to the script. My script reads:

docker run -it -d --name ${containerName} --user=${user} -e USER=${username} -e DISPLAY=${displayVar} --workdir -e QT_X11_NO_MITSHM=1 -e HOME=/home/docker/Users --workdir="/home/docker/Users" --volume="${home}:/home/docker/Users" -v=/tmp/.X11-unix:/tmp/.X11-unix ${imageName} /bin/bash --rcfile /opt/OpenFOAM/OpenFOAM-v3.0+/etc/bashrc

However now I can't even run the container:

taylor:~ myusername$ ./startOpenFOAM+_MAC
Error response from daemon: No such container: of_v3.0_plus
Error: failed to start containers: of_v3.0_plus
Error: No such container: of_v3.0_plus
k13113y is offline   Reply With Quote

Old   May 6, 2016, 11:31
Default
  #27
pgh
Senior Member
 
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 10
pgh is on a distinguished road
docker run -it -d --name ${containerName} --user=${user} -e USER=${username} -e DISPLAY=${displayVar} --workdir -e QT_X11_NO_MITSHM=1 -e HOME=/home/docker/Users --workdir="/home/docker/Users" --volume="${home}:/home/docker/Users" -v=/tmp/.X11-unix:/tmp/.X11-unix ${imageName} /bin/bash --rcfile /opt/OpenFOAM/OpenFOAM-v3.0+/etc/bashrc


remove --workDir that is highlightred above
k13113y likes this.
pgh is offline   Reply With Quote

Old   May 6, 2016, 12:01
Default
  #28
New Member
 
Evan
Join Date: May 2016
Posts: 23
Rep Power: 9
k13113y is on a distinguished road
Andd we have lift off! Thank you my friend, I am now running programs as user1000 and not as root
k13113y is offline   Reply With Quote

Old   May 7, 2016, 14:58
Default
  #29
New Member
 
Florida
Join Date: Jun 2015
Posts: 10
Rep Power: 10
azaria is on a distinguished road
Dear ugh,

I am back again, I used your latest script but I get the password incorrect. See below:

Merons-MacBook-Pro:~ ban$ ./startOpenFOAM+
of_v3.0_plus
bash-4.1$ su user
su: user user does not exist
bash-4.1$ su ofuser
Password:
su: incorrect password
bash-4.1$

I used the password ofuser2015 and Ofuser2015. Both did not work.

When I used the latest attached script I do not need to change users "Name".
any clue?

thanks,
Azaria
azaria is offline   Reply With Quote

Old   May 7, 2016, 15:39
Default
  #30
pgh
Senior Member
 
Pawan Ghildiyal
Join Date: Nov 2015
Posts: 135
Rep Power: 10
pgh is on a distinguished road
Hi Azaria

1)Before launching script, make sure to run command docker rm -f of_v3.0_plus

to make sure you have deleted old container.


2. )please note that with latest script you do not need to login as ofuser..

3) command "echo $USER", will throw user name as docker.. check this please

4) run this command "mkdir -p $FOAM_RUN" and see whether there is permission issue .

5)Login as root ie su root and use password 0fuser2015 ...
pgh is offline   Reply With Quote

Old   May 8, 2016, 11:13
Default
  #31
New Member
 
Florida
Join Date: Jun 2015
Posts: 10
Rep Power: 10
azaria is on a distinguished road
Dear pgh,

I have run the cavity tutorial successfully. Thank you so much.

Azaria
azaria is offline   Reply With Quote

Old   May 13, 2017, 18:26
Default
  #32
Member
 
Join Date: May 2017
Posts: 44
Rep Power: 8
bbita is on a distinguished road
Hi Pawan,

I am new to OpenFoam. I installed OPENFOAM for windows-v1612+. I am trying to run the first tutorial. I am in workingDir but when I enter" cp -ar $FOAM_TUTORIALS/incompressible/icoFoam/cavity/cavity ." I receive the error of permission denied. Please advise.

Thanks
bbita is offline   Reply With Quote

Old   May 14, 2017, 22:32
Default
  #33
Member
 
Join Date: May 2017
Posts: 44
Rep Power: 8
bbita is on a distinguished road
I finally solved the issue. uninstall the whole thing, activate windows module installer, check for updates for windows and reinstall the openFoam and the problem resolved.
pgh likes this.
bbita is offline   Reply With Quote

Reply


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
big difference between clockTime and executionTime LM4112 OpenFOAM Running, Solving & CFD 21 February 15, 2019 03:05
Gmsh installation on terminal help spitfire Main CFD Forum 4 July 27, 2017 15:11
[Other] How to create an MRF zone ? aminem OpenFOAM Meshing & Mesh Conversion 2 December 8, 2014 10:45
injection problem Mark New FLUENT 0 August 4, 2013 01:30
8x icoFoam speed up with Cufflink CUDA solver library kmooney OpenFOAM Running, Solving & CFD 42 November 6, 2012 11:37


All times are GMT -4. The time now is 17:04.