• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: setting PATH upon login
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setting PATH upon login


  • Subject: Re: setting PATH upon login
  • From: Grant Erickson <email@hidden>
  • Date: Mon, 13 Jan 2003 11:23:56 -0800

On 1/13/03 10:00 AM, Doug McNutt wrote:
> 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.

If you're not already using it, let me HIGHLY recommend 'modules':

    http://sourceforge.net/projects/modules/

I exclusively use ".login" and ".cshrc" files to set up my "login"
environment for the following OSes:

    Irix 6.2, 6.3, 6.5
    Linux 2.4
    Solaris 2.7, 2.8
    Mac OS X 10.2

whether that's running xterm or rxvt from Xdarwin.app or X11.app or running
Terminal.app directly in Mac OS X; dtterm on Solaris; winterm on Irix or
whatever on Linux, I always get the same environment with the same
modulefiles, .cshrc and .login.

Regards,

Grant


--
 Grant Erickson                       University of Minnesota Alumni
  * email@hidden                                      1996 BSEE
  * http://www.umn.edu/~erick205                          1998 MSEE
_______________________________________________
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.

  • Prev by Date: Re: Archives
  • Next by Date: release schedule? (was Re: workaround against osx menu bar problem??)
  • Previous by thread: Re: setting PATH upon login
  • Next by thread: workaround against osx menu bar problem??
  • Index(es):
    • Date
    • Thread