View previous topic :: View next topic |
Author |
Message |
Ghostryder Apprentice
Joined: 10 Dec 2003 Posts: 216
|
Posted: Thu Jun 02, 2005 6:44 am Post subject: PATH is not changeable |
|
|
Hi,
I wanted to change the path for user root. So I added the additional part in /etc/profile. It looks now like this:
if [ `/usr/bin/whoami` = 'root' ]
then
# Do not set PS1 for dumb terminals
if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ]
then
export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]'
fi
export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/opt/sun-jdk-1.5.0.03/bin:${ROOTPATH}"
But this doesn't have any effect. The Path-Variable is always the same. So I set it in the .bashrc-File and that worked. Why doesn't this have
any effect when changing in /etc/profile?
thanks, g. |
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Thu Jun 02, 2005 7:22 am Post subject: |
|
|
Quote: | this doesn't have any effect |
Then you didn't source the profile afterwards.
You should not generally have to make changes to /etc/profile to add system paths - use /etc.env.d/ for this.
There should be a ROOTPATH entry for sunjdk in there. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
Ghostryder Apprentice
Joined: 10 Dec 2003 Posts: 216
|
Posted: Thu Jun 02, 2005 7:27 am Post subject: |
|
|
Yes, there is a path for Java there.
I made a
env-update && source /etc/profile
and afterwards it worked. But the next time I invoked a shell, the old problem is still here... |
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Thu Jun 02, 2005 8:10 am Post subject: |
|
|
Quote: | the next time I invoked a shell |
Is this in a console, or in X as a regular user?
If the latter, you have to start the shell with root's environment; use
to do this. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
Ghostryder Apprentice
Joined: 10 Dec 2003 Posts: 216
|
Posted: Thu Jun 02, 2005 8:20 am Post subject: |
|
|
Thanks a lot. |
|
Back to top |
|
|
|