You are not logged in.

#1 2007-08-06 13:53:29

FeatherMonkey
Member
Registered: 2007-02-26
Posts: 313

.bashrc not being read :( [Solved]

As the title says my users bashrc file isn't being read but root's is, it all started with the PS1 thread, but now I've noticed the bashrc isn't being read at all.

alias ls='ls --color=auto'
# This line was appended by KDE
# Make sure our customised gtkrc file is loaded.
export GTK2_RC_FILES=$HOME/.gtkrc-2.0
PS1="`date +'%H:%M'`\[\033[01;32m\]\u@\[\033[01;34m\]\h\w\[\033[00m\]
$"

Even the ls alias which where already there isn't working.
Yet root which has a similar content is working fine.

What am I missing?

Last edited by FeatherMonkey (2007-08-06 18:47:55)

Offline

#2 2007-08-06 15:00:05

hybrid
Member
Registered: 2007-02-05
Posts: 223

Re: .bashrc not being read :( [Solved]

What are the permissions on your ~/.bashrc ?
You should own it and the owner should be allowed to execute that file.

Offline

#3 2007-08-06 15:13:38

FeatherMonkey
Member
Registered: 2007-02-26
Posts: 313

Re: .bashrc not being read :( [Solved]

Thanks hybrid
-rwxr--r--  1 User users     219 2007-08-06 14:35 .bashrc
I did change the execute bit but its not made the slightest bit of difference.

Last edited by FeatherMonkey (2007-08-06 15:14:02)

Offline

#4 2007-08-06 15:45:38

Gilneas
Member
From: Netherlands
Registered: 2006-10-22
Posts: 320

Re: .bashrc not being read :( [Solved]

What does your .bash_profile say?
Because mine sources .bashrc, and if I comment that line .bashrc won't be loaded.

Offline

#5 2007-08-06 15:54:14

FeatherMonkey
Member
Registered: 2007-02-26
Posts: 313

Re: .bashrc not being read :( [Solved]

Thanks Gilneas
. $HOME/.bashrc

Wasn't sure whether the dot was applicable so have tried by deleting it, still the same.
It actually is the same as root which is working, when I su I get the PS1 from root's bashrc. All in all a little confused.

Going to try a new user see if that helps.

Offline

#6 2007-08-06 16:19:13

FeatherMonkey
Member
Registered: 2007-02-26
Posts: 313

Re: .bashrc not being read :( [Solved]

mmm. It works with a new user, so I haven't got a clue if anyones got any more suggestions, otherwise I'll just migrate stuf to the new user.

Offline

#7 2007-08-06 16:19:31

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: .bashrc not being read :( [Solved]

FeatherMonkey wrote:

Thanks Gilneas
. $HOME/.bashrc

Wasn't sure whether the dot was applicable so have tried by deleting it, still the same.

The "." does the same as "source".

Offline

#8 2007-08-06 17:13:08

Gilneas
Member
From: Netherlands
Registered: 2006-10-22
Posts: 320

Re: .bashrc not being read :( [Solved]

What happens if you start a new bash with the -l switch? "bash -l"
So bash is a login shell which makes it source a bunch of profile files. (I don't know the specifics of this though)

And do you still have a $HOME variable? (not sure if this matters though, maybe the rc files can't be found)

Offline

#9 2007-08-06 17:28:14

FeatherMonkey
Member
Registered: 2007-02-26
Posts: 313

Re: .bashrc not being read :( [Solved]

Ewww that works, think I need to read man bash never done that before wink 

Thanks Gilneas
For some reason when I created the account it didn't have a login shell, just installed kdeadmin to check and modify it, out of curiosity how would I of achieved this from the cli?

Think my mistake was useradd rather than adduser.

Offline

Board footer

Powered by FluxBB