LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-26-2002, 04:24 AM   #1
javajose
LQ Newbie
 
Registered: Nov 2002
Posts: 8

Rep: Reputation: 0
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.
 
Old 11-26-2002, 04:36 AM   #2
gigsvoo
Member
 
Registered: Nov 2002
Posts: 100

Rep: Reputation: 15
May I ask what command you want it to run?
 
Old 11-26-2002, 05:08 PM   #3
javajose
LQ Newbie
 
Registered: Nov 2002
Posts: 8

Original Poster
Rep: Reputation: 0
exporting JAVA_HOME
 
Old 11-26-2002, 08:45 PM   #4
gigsvoo
Member
 
Registered: Nov 2002
Posts: 100

Rep: Reputation: 15
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?
 
Old 12-01-2002, 02:53 PM   #5
javajose
LQ Newbie
 
Registered: Nov 2002
Posts: 8

Original Poster
Rep: Reputation: 0
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?
 
Old 12-01-2002, 05:14 PM   #6
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30
won't that work on .bashrc ???
 
Old 12-01-2002, 08:18 PM   #7
gigsvoo
Member
 
Registered: Nov 2002
Posts: 100

Rep: Reputation: 15
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.
 
Old 12-01-2002, 08:19 PM   #8
gigsvoo
Member
 
Registered: Nov 2002
Posts: 100

Rep: Reputation: 15
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.
 
Old 12-01-2002, 08:36 PM   #9
Ciccio
Member
 
Registered: Nov 2002
Location: Paraguay
Distribution: Mandrake 10
Posts: 573

Rep: Reputation: 30
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
 
Old 12-01-2002, 08:49 PM   #10
sbrown
LQ Newbie
 
Registered: Nov 2002
Location: Calgary, Canada
Distribution: Red Hat 7.3/Slackware 8.1
Posts: 19

Rep: Reputation: 0
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
 
Old 12-01-2002, 09:04 PM   #11
gigsvoo
Member
 
Registered: Nov 2002
Posts: 100

Rep: Reputation: 15
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
Of course they is no problem, I did not said "ONLY".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
.bash_profile (hence .bashrc) not executing with ssh arobinson74 Linux - General 1 10-31-2004 10:55 AM
mandake 10 airmikeyy Linux - General 1 04-03-2004 01:18 PM
Help ....cant get mandake to boot Mike_dna Linux - Newbie 6 02-01-2004 06:06 PM
.bash_profile not executing linuxRules Linux - General 3 05-29-2002 08:24 PM
Grub reinstallation Mandake 7.2 Martin Linux - General 1 04-19-2001 10:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration