SUMMARY : Environment Trivia- well sort of.

From: = Omitka = (omitka@hotmail.com)
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
developers.

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.

---=1=---

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:

          HOME=your-login-directory
          LOGNAME=your-login-name
          PATH=/usr/bin:
          SHELL=last-field-of-passwd-entry
          MAIL=/var/mail/your-login-name
          TZ=timezone-specification

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

  DISPLAY
     is set to the associated display name

  EDITOR
     is set to /usr/dt/bin/dtpad

  HOME
     is set to the home directory of the user

  (and about 100 other things)

---=2=---

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.

---=3=---

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.

cheerz
-Robert

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com



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