OESF Portables Forum

General Forums => General Discussion => Topic started by: tonyb on June 26, 2004, 04:34:00 am

Title: Changing path in .profile
Post by: tonyb on June 26, 2004, 04:34:00 am
I am trying to append to the PATH for root a hierarchy that starts at :/mnt/cf/...:/mnt/cf/.. etc.
SO I modified /home/root/.profile to append the directories in /mnt/cf, however, going su
from a terminal session, does not include the new PATH???

Thanks for any suggestions.
Hufnus
Title: Changing path in .profile
Post by: zxerx on June 26, 2004, 05:57:08 am
your .profile only gets read once when you log in - this lets you set up environment variables and stuff that you want to be the same across all shells you might use during your login session.

When you su into root, the root .profile is not read because it is not a login shell. Try "su - root" which will force a login shell and you will see the difference.

You will want to put your path modifications for root into .bashrc which gets read every time you start a new shell.
Title: Changing path in .profile
Post by: Stubear on June 26, 2004, 09:26:34 am
Actually you can get away with just "su -" most of the time, just a lazy tip

Stu