LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Mandake 9.0 not executing .bash_profile (https://www.linuxquestions.org/questions/linux-general-1/mandake-9-0-not-executing-bash_profile-36495/)

javajose 11-26-2002 03:24 AM

Mandake 9.0 not executing .bash_profile
 
Mandrake 9.0 seems not to be executing my commands in .bash_profile if I log automatically after booting. But it does it if I log manually. Any ideas?
Thanks.

gigsvoo 11-26-2002 03:36 AM

May I ask what command you want it to run?

javajose 11-26-2002 04:08 PM

exporting JAVA_HOME

gigsvoo 11-26-2002 07:45 PM

Ok... now I get it, you wanna set the path environment for J2EE.

You statement should be similar to this right?

J2EE_HOME = /usr/lib/j2sdkeeX.XX

export J2EE_HOME

it shoud be working in this way.

Otherwise you can write this in the glocal environment if still yet working. This is strange.

Emm.. are u running bash shell in the first place? Check by typing:

echo $SHELL

and what you have?

javajose 12-01-2002 01:53 PM

Thanks for anwering.

This is from my .bash_profile :

PATH=$PATH:$HOME/bin:/usr/java/"j2sdk1.4.1_01/bin"
JAVA_HOME=/usr/java/"j2sdk1.4.1_01"

export PATH JAVA_HOME

I know the " are not necessay. When executed from the shell (bash) the previous commands are working. When I logged out and log in again it is ok. However when I (re)boot it is not. I have set automatic login.
What dou you think?

Ciccio 12-01-2002 04:14 PM

won't that work on .bashrc ???

gigsvoo 12-01-2002 07:18 PM

Quote:

Originally posted by javajose
Thanks for anwering.

This is from my .bash_profile :

PATH=$PATH:$HOME/bin:/usr/java/"j2sdk1.4.1_01/bin"
JAVA_HOME=/usr/java/"j2sdk1.4.1_01"

export PATH JAVA_HOME

I know the " are not necessay. When executed from the shell (bash) the previous commands are working. When I logged out and log in again it is ok. However when I (re)boot it is not. I have set automatic login.
What dou you think?

Remove the double quotes.

gigsvoo 12-01-2002 07:19 PM

Quote:

Originally posted by Ciccio
won't that work on .bashrc ???
Both Redhat and Mandrake implement user initialization and environment path setting using .bash_profile.

Ciccio 12-01-2002 07:36 PM

Sorry to disagree... I'm watching at it RIGH now... .bashrc works on mandrake 9.0. Obviously the .bash_profile is loaded after .bashrc and it overwrites .bashrc.

The Sair Linux and GNU certification, Level 1: System Administration book says:

Quote:

The difference between the .bashrc and the profile files is that .bashrc is used for interactive shells, ehre profile in used strictly for login shells. Thus, when you log in, .bashrc is read, then profile is read. If you were to switch to bash shell for example, then the bashrc file alone would be in use.
And I'm seeing it right now in my home direcotry a beautiful file called .bashrc

I'll ask again, Can't it be done using .bashrc instead of .bash_profile?

Save teh penguin :Pengy:

sbrown 12-01-2002 07:49 PM

It can be done in either, the first lines of the .bash_profile should be an if statement that checkes if the .bashrc exists and then exicutes it, and then continues on in the .bash_profile

However, i have noticed a similar thing when exporting Oracle related variables, specifically the ORACLE_SID, where on Red Hat and TurboLinux, the oracle_sid never got set unless it was exported in the .bashrc

Technically, yes these things should be put into the .bashrc, however because its called from the .bash_profile who cares where you put it

gigsvoo 12-01-2002 08:04 PM

Quote:

Originally posted by Ciccio
Sorry to disagree... I'm watching at it RIGH now... .bashrc works on mandrake 9.0. Obviously the .bash_profile is loaded after .bashrc and it overwrites .bashrc.

The Sair Linux and GNU certification, Level 1: System Administration book says:



And I'm seeing it right now in my home direcotry a beautiful file called .bashrc

I'll ask again, Can't it be done using .bashrc instead of .bash_profile?

Save teh penguin :Pengy:

Of course they is no problem, I did not said "ONLY". :rolleyes:


All times are GMT -5. The time now is 08:31 PM.