CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Homebashrc (http://www.cfd-online.com/Forums/openfoam-installation/57525-homebashrc.html)

stian May 16, 2007 08:49

Dear all Seams home/.bashrc
 
Dear all

Seams home/.bashrc don't exsist in fedora even it is running bash.

Annyone that can help me on this one?
I'm running fedora 6 64bit.

mwild May 16, 2007 08:58

you mean $HOME/.bashrc (or ~/.
 
you mean $HOME/.bashrc (or ~/.bashrc)? if it doesn't exist, simply create it.

stian May 16, 2007 09:05

how do I make it? I gues it'
 
how do I make it?
I gues it's suposed to contain some comands and be of a certain file format.

I gues it's suposed to be $HOME/Stian/.bashrc

mwild May 16, 2007 09:15

No. Open a shell and put the f
 
No. Open a shell and put the following code into it (all on one line):


echo ". ~/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/bashrc" >> ~/.bashrc


this appends the thing in between the quotes to your ~/.bashrc file.


Hope this helps...

stian May 16, 2007 09:28

Turned out that the .bashrc fi
 
Turned out that the .bashrc file is hidden by default in fedora.

Now my problem is 'foamInstallationTest' how do I runn it? I gues I have to type some magic words in a terminal.

mwild May 16, 2007 09:49

Well, on *nix like systems (i.
 
Well, on *nix like systems (i.e. linux, mac, *-bsd, etc.) all files and directories with a name starting with a . are hidden... You can show them by choosing "Show hidden files" in your file browser or in the command line with the -a option for ls, i.e.

ls -a ~/

will show all files in your home (including the hidden ones)


Once the ~/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/bashrc file has ben sourced (should happen in the ~/.bashrc file automatically now) you should be able to run the foamInstallationTest from the command line without any magic.

stian May 16, 2007 09:53

root@localhost ~]# foamInstall
 
[root@localhost ~]# foamInstallationTest
bash: foamInstallationTest: command not found

[root@localhost bin]# foamInstallationTest
bash: foamInstallationTest: command not found

I gues something is wrong

santos May 17, 2007 07:45

You must be logged as user, an
 
You must be logged as user, and not as root.

Josť Santos

stian May 20, 2007 12:55

bash: /Stian/OpenFOAM/OpenFOAM
 
bash: /Stian/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/bashrc: Ingen slik fil eller filkatalog

stian May 20, 2007 13:36

I did the whole instalation pr
 
I did the whole instalation proces all over again.

The location of OpenFOAM is home/Stian/OpenFoam/OpenFoam-1.4

I pack it all out and add the line in the bashrc fil in home/Stian and then type $Home/Stian/.bashrc and it just don't find it.

Should I just sitt down and pray that there will come a RPM I can donwload.

I'm stuck

rafal May 20, 2007 14:49

rpm will probably never come o
 
rpm will probably never come out since
installation is simple and every user
is keeping his own version of OF and
changing something in it to fit his/her
purpose.

from what I see it you are doing the following mistake:
NOT: $Home/Stian/.bashrc
but: $HOME/.bashrc
or
/home/Stian/.bashrc

bash takes HOME variable and substitute it
for something specific for user.
so HOME variable when you do $HOME is substituted
by /home/Stain (in your case).
try:
echo $HOME
should give: /home/Stain
echo $Home
should give: nothing
since Home and HOME there are two different
variables. In linux capitalization matters.
and DO NOT USE root during any part of installation
you dont need it and it can mess up with
some permissions.

follow the installation instructions and everything
will be installed properly.
and dont give up on OF http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

hope that helps
rafal

benru May 21, 2007 01:21

2 Rafal 1. After installati
 
2 Rafal

1. After installation you should change properties of some files to make them executable (by default they are not executable) to set environment correctly from $HOME/.bashrc or $HOME/.tcshrc . These files are :
OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/bashrc
OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/cshrc
OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/ensightFoam/bashrc
OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/ensightFoam/cshrc
OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/FoamX/createFlag
OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/FoamX/createFlagWithArgument
OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/paraview/bashrc
OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/paraview/cshrc
OpenFOAM/OpenFOAM-1.4/.bashrc
OpenFOAM/OpenFOAM-1.4/.cshrc

2. I use Debian (with updates up to may 2007), and tcsh (in spite of bash). Bash script (I don't understand why) don't set environmental variables correctly on my PC.

Regards

rafal May 21, 2007 16:29

1. have never changed any of t
 
1. have never changed any of those files hmm...
but why those files need to be executable?
They have #!/bin/bash or #!/bin/csh in first line
they can be sourced in my opinion.

if you consider it a bug submit it in bug section

but i personally do not think it is a bug. on my
system everything works well and they do not have
executable attribute in my tree directory.
2. I use gentoo but it doesnt matter because OF is OS independent (providing that you have all
necessary libraries and files, demangle.h, libelf, etc.) and it should work with both bash and tcsh the same effective. if it doesnt you have found a
bug or you missed something in procedure of installing.

benru May 22, 2007 08:22

Yes, you're right. It seem
 
Yes, you're right.

It seems to me, it would be better change README (about modification of bashrc (cshrc) - 3a & 3b), where would be added single string :
source $Home/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/bashrc(cshrc)

Direct use of run $Home/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/bashrc
in .bashrc does not set environmental variables.

Thank you

stian May 26, 2007 13:01

from what I see it you are doi
 
from what I see it you are doing the following mistake:
NOT: $Home/Stian/.bashrc
but: $HOME/.bashrc
or
/home/Stian/.bashrc

bash takes HOME variable and substitute it
for something specific for user.
so HOME variable when you do $HOME is substituted
by /home/Stain (in your case).
try:
echo $HOME
should give: /home/Stain


I tryed again today and everything work like you say, but when I type

[Stian@localhost ~]$ $HOME/.bashrc
bash: /home/Stian/.bashrc: Ikke tilgang(no access)

And I get the same after typing su - and pasword.

I try to do a fresh install tomorow or some other day or just pray that Fedora one day will include it in there software library.

armin_h May 28, 2007 03:21

Dear all To install the Ope
 
Dear all

To install the OpenFoam 1.4 , i have a problem and now i solve it.

i would put it here to help any one which have a such a problem regarding to install the openfoam 1.4.

the following message appear when you wants to run FoamX:

Starting NameServer with inet:armin-desktop:1234 ...
nsd: error while loading shared libraries:: cannot open shared object file: No such file or directory

just you should go to the linux desktop and to synpatic pacakge manger and apply for the updating the libssl.so.0.9.7.

and then follow the read me instruction for the openfoam 1.4 .


Good Luck

Armin

rafal May 28, 2007 06:50

Stian to source .bashrc you n
 
Stian
to source .bashrc you need to write:
. $HOME/.bashrc
which is :
[dot][space]$HOME/.bashrc

philippose July 1, 2007 17:51

Hello there, I guess you fo
 
Hello there,

I guess you forgot that linux is case-sensitive :-)! If you put in "$home", you dont get anything, because the environment variable is "$HOME"... all capitals.

Thats where your problem lies... change that, and it should work like a charm :-)!

Have a nice day and enjoy!

Philippose

philippose July 1, 2007 17:57

And.... are you sure you want
 
And.... are you sure you want to run as root ??? Its really not recommended that you do that!

Anyway.... if you source the OpenFOAM bashrc file in the .bashrc of the user account as you seem to be trying to do.... "foamInstallationTest" will not work as root.....

One more thing... you do not need to be running as root in order to be able to modify the .bashrc file in the home directory of a user account.

And yet another thing :-)! Once you add that to the .bashrc file, you need to close the console and open a new one again, or source the .bashrc file so that the changes are updated.

Philippose

stian July 2, 2007 01:00

. $HOME/Openfoam/OpenFOAM-1.4/
 
. $HOME/Openfoam/OpenFOAM-1.4/.OpenFOAM-1.4/bashrc

and then I get

[Stian@localhost ~]$ . $HOME/.bashrc

/home/Stian/.OpenFOAM-1.4/bashrc: cannot find FOAM installation

why is it looking in Stian/.Openfoam?

[Stian@localhost ~]$ cd /home/Stian/.OpenFOAM-1.4/
bash: cd: /home/Stian/.OpenFOAM-1.4/: Ingen slik fil eller filkatalog(no sutch file or folder)


All times are GMT -4. The time now is 19:39.