Forum Moderators: bakedjake

Message Too Old, No Replies

.bashrc

only root can use one?

         

jamie

7:07 am on Jun 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



hi,

i am unable to get any user other than root to use a .bashrc file.

i have saved a simple .bashrc in the user home directory, given it the correct owner permissions, but i still get the same boring prompt.

root on the other hand, using the same file in his directory has lots of pretty colours and useful info at the prompt.

why might a normal user not be able to use a .bashrc file?

thanks

AbsintheSyringe

7:22 am on Jun 2, 2005 (gmt 0)

10+ Year Member



Did you try "source ~/.bashrc"?

There was something about uncommenting some lines, really cant remember at the moment.

MattyMoose

3:54 pm on Jun 2, 2005 (gmt 0)

10+ Year Member



Is that user set to use bash?

I found on some systems that .bashrc was ignored and .bash_profile was the one that was executed.

Oh, and are you su'ing to that user or logging in as them directly?

MM

jamie

5:45 am on Jun 3, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



thanks both!

i tried source ~/.bashrc from the command line and it worked - but i can't get it loading automatically at login...

matty, the user is the one i login from. you put me in the right direction; i found info online saying that if it is a shell from a user which hasn't logged in, then .bashrc is used, otherwise .bash_profile is used.

i edited .bash_profile and uncommented the lines:
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi

but it still doesn't automatically source .bashrc when i login? i am not sure why

cheers

MattyMoose

5:28 pm on Jun 3, 2005 (gmt 0)

10+ Year Member



Try:
ln -s ~/.bashrc ~/.bash_profile

See if that works out!

jamie

9:10 am on Jun 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



sorry matty, it didn't,

i'll do some more investigating - i am sure there is a simple solution.

thanks anyway