LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 11-06-2005, 01:47 PM   #1
disorderly
Member
 
Registered: Sep 2003
Location: NJ
Distribution: RHEL5
Posts: 154

Rep: Reputation: 30
.bash_profile not being read


hello!
i recently updated fc3 to fc4 and now it seems that .bash_profile is not being read after startup! all my shortcuts are in there and so i have to source .bash_profile after i log in to get my shortcuts - pretty annoying actually. could someone please tell me how i can get it to be automatically read like it was before i upgraded?? this happens for normal users and root btw

puzzled,
disorderly

post 101!
 
Old 11-06-2005, 02:15 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,865

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
"i recently updated fc3 to fc4 and now it seems that .bash_profile is not being read after startup! all my shortcuts are in there and so i have to source .bash_profile after i log in to get my shortcuts - pretty annoying actually. could someone please tell me how i can get it to be automatically read like it was before i upgraded?? this happens for normal users and root btw"

.profile, .bashrc, and .bash_profile can all be used to initialize a user's environment when he logs in. However different distributions use different files for user initialization and no distribution uses all three files. Since .bash_profile does not seem to be used in Fedora try .profile and .bashrc.

---------------------
Steve Stites
 
Old 11-06-2005, 03:10 PM   #3
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Rep: Reputation: 15
Couldn't .bash_login be include in that list?

I suspect that Fedora Core 3 and 4 use the same bash profile files. However, there is an hierarchy to the bash profile files; the presents of a .bash_profile file does not necessarily mean that the .bash_profile file is the file called during boot-up.

"The ~/.bash_profile script can also be referred to or named as the .bash_login or .profile script. If all three exist, the ~/.bash_profile is sourced. Finally, if the first two are nonexistent, the .profile script is sourced...." -- Ross Brunson, LPIC I Exam Cram
 
Old 11-09-2005, 09:34 PM   #4
disorderly
Member
 
Registered: Sep 2003
Location: NJ
Distribution: RHEL5
Posts: 154

Original Poster
Rep: Reputation: 30
thank you very much for your replies
i did some experiments and for my system it appears that:

if i log in using xwindows
- .profile is not read
- .bash_profile is not read
- .bashrc is read
- .bash_login is not read

if i log in using the terminal (remotely)
- .profile is read
- .bashrc is read
- .bash_profile is read

when i say 'read', i mean i put some shortcuts in there and tested to see if they can be used.

if log in using xwindows with .bash_profile & .bashrc removed it doesn't seem to read .profile!
seems pretty inconsistant to me.. it's also very strange that .bash_profile was used for fc3 but not fc4

any idea what's going on?
disorderly
 
Old 11-10-2005, 08:21 AM   #5
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Rep: Reputation: 15
Please don't be offended if I ask some basic questions:

By "shortcut" do you mean symbolic/hard link?

Are you signing on as the same user? How do you remotely log-in? Telnet?
Quote:
if log in using xwindows with .bash_profile & .bashrc removed it doesn't seem to read .profile!
I wouldn't expect .profile to be read, rather I'd look for .bash_login to be "read."
 
Old 11-10-2005, 08:44 AM   #6
disorderly
Member
 
Registered: Sep 2003
Location: NJ
Distribution: RHEL5
Posts: 154

Original Poster
Rep: Reputation: 30
offended? no way - i'm here to learn
sorry i should have been more specific. by shortcuts i meant adding aliases to those files. i put in alias goweb = 'cd /var/www/html' and tested whether or not i could use it after logging in.
if there's a better way to test lemme know!
Quote:
By "shortcut" do you mean symbolic/hard link?

Are you signing on as the same user? How do you remotely log-in? Telnet?
when i log in remotely i meant using ssh - no gui. when i said using xwindows i meant using the gui & actually sitting at that machine. i logged in as the same user each time - a non-root user. does that help?
 
Old 11-10-2005, 11:05 AM   #7
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Rep: Reputation: 15
Not that everything you read in Forums is true. This doesn't explain everything, but it is a start.

Link to Forum
Quote:
Is this a terminal that comes up after your already logged-on or one that you must logon to?
.bash_profile applies to one and .bashrc applies to the other, as I understand it .
 
Old 11-10-2005, 02:07 PM   #8
disorderly
Member
 
Registered: Sep 2003
Location: NJ
Distribution: RHEL5
Posts: 154

Original Poster
Rep: Reputation: 30
thanks for the link
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
.bash_profile nguye103 Linux - Software 3 10-22-2004 01:48 PM
where is ~/.bash_profile? Jskill007 Slackware 4 09-17-2004 11:04 PM
.bash_profile wildcat22 Linux - General 3 04-13-2004 07:08 PM
need .bash_profile example true_atlantis Slackware 2 02-07-2004 06:27 PM
.bash_profile sikandar Linux - Software 9 08-31-2003 10:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 12:32 PM.

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