SUMMARY : Environment Trivia- well sort of.

From: = Omitka = (
Date: Thu Mar 23 2000 - 09:20:09 CST

----Original question--->

   Here's a simple one that i couldn't find an absolute answer for one of my

How, or from where do users attain their initial environment settings?
for e.g. DISPLAY etc etc.

Where does the root user's environment variables get initialized?

Beyond /etc/profile $HOME/.profile $HOME/.cshrc what is/are the best ways
to assert system wide environment settings?

<----End Original question----

Thanks to all that responded. I've appended the distinct responses below.
RTFM is the best solution yet again.. doing 'man' on login and dtlogin
proved most insightful.


Gordon Hopper

see the man pages on login and dtlogin. (dtlogin is in /usr/dt/share/man,
which may not be in your MANPATH). dtlogin is run for GUI logins, and login
is run for telnet logins.

Note that ssh does it's own thing and sets a few more environment variables
(such as DISPLAY for secure X11 display forwarding).

from login's man page:
     The basic environment is initialized to:


from dtlogin's man page:
     The dtlogin client invokes the user's session with the fol-
     lowing default environment:

     is set to the associated display name

     is set to /usr/dt/bin/dtpad

     is set to the home directory of the user

  (and about 100 other things)


David Evans:

There are many ways. If using CDE then /etc/dt/... can be used.

for /etc/profile or /etc/.login you can either make your changes to
the files or have them source another file. As /etc/profile and
/etc/.login have been known to be overwritten on OS upgrades in the
past I have all my system specific items in another directory
(like /sysadim) and append a final line to the system supplied files
that sources the ones I make available.


David Foster:

The best way to do this is to create global startup files (we use
/usr/local/etc/.{cshrc,login}), and then source these in each
users' .cshrc and .login files respectively.


Get Your Private, Free Email at

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:05 CDT