View previous topic :: View next topic |
Author |
Message |
cteverett n00b
Joined: 11 Mar 2004 Posts: 5
|
Posted: Fri Mar 12, 2004 6:48 am Post subject: /etc/profile not being sourced on user login |
|
|
I just installed Gentoo and I'm having a bit of trouble with my user account. Everything seems to work for root, X, Gnome, etc. But I can't bring up an xterm in my user account. I've traced it to /etc/profile not being sourced when I log in as a user. I found this out my logging is as root, 'su'ing to my user account and trying to run 'xterm' with a command not found error. If I manually source /etc/profile then my path is updated to include /usr/X11R6/bin and then 'xterm' can be found.
How do I ensure that /etc/profile is sourced on a user log in? It seems to be sourced at 'root' login.
Thanks,
-Chris |
|
Back to top |
|
|
Earthwings Bodhisattva
Joined: 14 Apr 2003 Posts: 7753 Location: Germany
|
Posted: Fri Mar 12, 2004 7:40 am Post subject: |
|
|
put it in ~/.bashrc |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Fri Mar 12, 2004 3:42 pm Post subject: |
|
|
I have this as the first line in my ~/.bashrc file. Picked it up somewhere on the forums. Code: | [ -r /etc/profile ] && . /etc/profile |
Moved from Installing Gentoo. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
padukes Apprentice
Joined: 27 Feb 2003 Posts: 232
|
Posted: Fri Mar 12, 2004 5:01 pm Post subject: |
|
|
How are you "su"ing? My guess is you're doing something like
This is fine, but doesn't do a login as username it just sets your user id. If you do
It will be as if you just logged in as username and so your path should be set up.
-P |
|
Back to top |
|
|
cteverett n00b
Joined: 11 Mar 2004 Posts: 5
|
Posted: Sat Mar 13, 2004 12:33 am Post subject: |
|
|
I tried adding:
[ -r /etc/profile ] && . /etc/profile
to my .bashrc file but it didn't seem to have any effect. I changed it to:
source /etc/profile
and that didn't work either. But, now when I su to my user account, either way, I have a complete path. Does .bashrc only get called after the xterm is started? What gets called when the window manager starts up?
Thanks,
-Chris |
|
Back to top |
|
|
darksaidin Apprentice
Joined: 04 Oct 2003 Posts: 150
|
Posted: Fri Apr 09, 2004 10:21 pm Post subject: |
|
|
padukes wrote: | How are you "su"ing? My guess is you're doing something like
This is fine, but doesn't do a login as username it just sets your user id. If you do
It will be as if you just logged in as username and so your path should be set up.
-P |
Thanks! A lot cleaner than sourcing /etc/profile from root's .bashrc |
|
Back to top |
|
|
|