Bug 178481 - .bash_profile not being read?
Summary: .bash_profile not being read?
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: setup
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-01-20 21:47 UTC by Need Real Name
Modified: 2015-03-05 01:15 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-01-27 10:30:38 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2006-01-20 21:47:36 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051215 Epiphany/1.9.4

Description of problem:
On a fresh install, my .bash_profile contains the line
 PATH=$PATH:$HOME/bin

but my PATH doesn't contain /home/username/bin:

$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
x

Additional info:

Comment 1 Need Real Name 2006-01-21 10:40:16 UTC
The problem is caused by bin/ not being available at the time of the login.
Something is stripping it from the path.

Comment 2 Phil Knirsch 2006-01-24 20:01:35 UTC
I've tried reproducing this on a fresh system, but i get the expected path:

[pknirsch@hamburg ~]$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/devel/pknirsch/bin

Also, why isn't bin available at login time?!

Read ya, Phil

Comment 3 Need Real Name 2006-01-24 20:07:53 UTC
(In reply to comment #2)
> I've tried reproducing this on a fresh system, but i get the expected path:
> 
> [pknirsch@hamburg ~]$ echo $PATH
>
/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/devel/pknirsch/bin
Was /home/devel/pknirsch/bin available at login time?

> Also, why isn't bin available at login time?!
If the path contained an nfs share that was playing up, the user's path would
never see the programs when it came back.

Comment 4 Phil Knirsch 2006-01-25 09:19:22 UTC
Ah, now i understand:

Your homedir isn't mounted at login time (because auf automount or whatever i
suspect) and then $HOME/bin won't be added to the PATH?

Gonna investigate.

Read ya, Phil

Comment 5 Phil Knirsch 2006-01-25 15:10:19 UTC
OK, the problem seems to be that the $HOME/bin is only added if your
homedirectory is available during login time, more precisely ~/.bash_profile as
the $HOME/bin will be added during that time and not by the system wide
/etc/bashrc or /etc/profile.

So either your users ~/.bash_profile doesn't add the $HOME/bin dir or simply
isn't accessible during login.

But as you have a fresh install and your bugreport clearly states that you have
a .bash_profile i can only assume that $HOME isn't mounted at login time.

I can't reproduce the problem here, but if you could put some echo commands into
/etc/bashrc, /etc/profile, ~/.bashrc, ~/.bash_profile and ~/.profile this would
give me some info what files are read and which aren't (maybe with an added df
output to see what directories are mounted and which aren't).

Read ya, Phil

Comment 6 Need Real Name 2006-01-25 16:22:36 UTC
I think the problem could be better explained like this:

I have an nfs partition (or usb drive) mounted under /mnt/shared

At login, my .bash_profile script adds /mnt/shared/bin to my path.
If the usb drive is unplugged, or the nfs server is down, my PATH does not
contain /mnt/shared, but it should.

Comment 7 Phil Knirsch 2006-01-26 14:46:23 UTC
I've just tried to reproduce it by doing this:

Added

 PATH=$PATH:/no/such/bin

to my .bash_profile and relogged into my machine and /no/such/bin appears in my
PATH variable as it should, so i have a real hard time reproducing your problem.

Maybe you do some checks if /mnt/shared is there and only add the path if it is
there?

Read ya, Phil

Comment 8 Need Real Name 2006-01-26 17:39:50 UTC
Hm. I can't reproduce it now either!

Oh well! Sorry to take up your time :/

Comment 9 Phil Knirsch 2006-01-27 10:30:38 UTC
OK, closing as worksforme then.

Read ya, Phil


Note You need to log in before you can comment on or make changes to this bug.