Re: setting PATH upon login
Re: setting PATH upon login
- Subject: Re: setting PATH upon login
- From: Doug McNutt <email@hidden>
- Date: Mon, 13 Jan 2003 10:37:19 -0700
At 15:34 +0000 1/13/03, Lawrence Paulson wrote:
>The .MacOSX/environment hack described at http://developer.apple.com/qa/qa2001/qa1067.html seems to work for environment variables other than PATH, which presumably is being initialized elsewhere. Where does PATH get initialized then? (.bashrc is too late for the X11 applications menu)
Terminal app picks up the PATH as set in environment.plist but then it goes and executes /etc/.login which proceeds to overwrite it with the four standard bin's.
And that is only done if Terminal is started up as a login shell. When a *.command file is double clicked it doesn't happen. Ditto for opening a worksheet in Project Builder or BBEdit.
I set an environment variable DIDLOGIN with the plist and I reset it in my ~/.login script. I can then check it in my *rc files (tcsh for me) which seem to get executed reliably. I can then reset PATH in the rc script.
But. . . If you're using do shell script from AppleScript you should know that you enter your script at SHLVL 2 which means that a test in the *rc script for SHLVL = 1 to simulate a login won't work correctly.
It's all a legacy pain and it ought to get cleared up. I'd like to see a login that describes my login at login time not one that thinks user login to system neXt is something other than user login to the UNIX box.
And, by the way, the environment.plist file is read only at system neXt login time. It won't get noticed if you try to change it dynamically.
I now think that editing the system .login script is the only way to go but I have no idea if that will survive an update.
--
--> Life begins at ovulation. Ladies should endeavor to get every young life fertilized. <--
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe: http://www.lists.apple.com/mailman/listinfo/x11-users
Do not post admin requests to the list. They will be ignored.