[SunHELP] Environmental Variables

Will Mc Donald wmcdonald at ntlworld.com
Tue Jul 1 13:13:58 CDT 2003


If all your users are running tcsh then you should be able to do 
something in /etc/csh/cshrc From the tcsh man page...


Startup and shutdown
        A login shell begins by executing commands from the system
        files /etc/csh.cshrc and /etc/csh.login.  It then executes
        commands  from  files  in the user's home directory: first
        ~/.tcshrc (+) or, if ~/.tcshrc  is  not  found,  ~/.cshrc,
        then  ~/.history (or the value of the histfile shell vari-
        able), then ~/.login, and finally ~/.cshdirs (or the value
        of  the  dirsfile shell variable) (+).  The shell may read
        /etc/csh.login before instead of after /etc/csh.cshrc, and
        ~/.login before instead of after ~/.tcshrc or ~/.cshrc and
        ~/.history, if so compiled; see the  version  shell  vari-
        able. (+)

        Non-login shells read only /etc/csh.cshrc and ~/.tcshrc or
        ~/.cshrc on startup.

I don't think there's anywhere you could set the environment across all 
shells. Maybe /etc/login ? Or possibly you could do something in 
/etc/skell so that the detail dot files contain the settings you're 
after?

Will.

On Tuesday, July 1, 2003, at 07:00  pm, Michael A. Turner wrote:

> 	Alrighty. I have installed some of the software options from the sun
> options CD. They live in /opt/sfw . Now in order to have them run 
> properly
> they need to be in the PATH. So I figure out that typing setenv PATH
> /usr/bin:/usr/sbin:/opt/sfw/bin:/opt/sfw/sbin:/usr/openwin/bin gives 
> me the
> love I want. The problem I have is that I want all users to have this 
> path
> statement permanently. I have fixed this for myself so that when I 
> login
> into my shell my .login runs that command and the world is good.
> Unfortunately as soon as I SU I loose that path and I have to reset 
> it. Then
> I jump into the tcsh shell and again loose my env variables.
>
>        Is there anyway to make PATH
> /usr/bin:/usr/sbin:/opt/sfw/bin:/opt/sfw/sbin:/usr/openwin/bin global 
> to
> everyone? I want all users to have the ability to use that PATH and 
> not to
> go looking for it/
>
>
>
> Michael A. Turner
> Systems Engineer WHRO
> michael.turner at whro.org
> http://www.whro.org
> _______________________________________________
> SunHELP maillist  -  SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp



More information about the SunHELP mailing list