Author Topic: Changing path in .profile  (Read 704 times)

tonyb

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • http://www.sysdev.org
Changing path in .profile
« 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
TonyB Hufnus Borras
Zaurus SL-6000 ROM 1.12
http://www.sysdev.org
OpenEmbedded Rules

zxerx

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
    • http://
Changing path in .profile
« Reply #1 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.
[span style=\'font-size:7pt;line-height:100%\']Zaurus SL-C760 :: pdaXrom 1.0.5 :: Toshiba 512Mb SD :: Hagiwara 256Mb 10Mbit/s SD :: PQI 256Mb 40x CF :: Socket Low Power 10Mb/s Ethernet CF :: Seano WiFi CF :: Xircom 56k Modem CF[/span]

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
Changing path in .profile
« Reply #2 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
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card