USERENV(1) Silicon Graphics USERENV(1)
NAME [Toc] [Back]
userenv - print user's login environment
SYNOPSIS [Toc] [Back]
userenv [-nologin] [-csh] [ -t timeout ]
DESCRIPTION [Toc] [Back]
userenv executes a user's login shell, finds the resulting
environment, and then prints to stdout commands such as
PATH=mypath; export PATH
which can be eval'ed by /bin/sh in order to set the
environment.
Userenv starts an interactive shell. Before executing the
shell, it sets the environment variable ENVONLY equal to 1.
Thus, when your login scripts are executed as a result of
userenv, they will execute fastest if, after seeing that
ENVONLY = 1, they do very little except for setting the
environment. This variable is also useful for disabling
interactive portions of login scripts.
Although userenv is fairly robust, it's possible that
interactive sequences in a login script might fail. At
worst, userenv will timeout when interacting with the shell,
and will print nothing to stdout. If it times out, it will
print an error message to /dev/console.
This program is intended for use by the window system.
OPTIONS [Toc] [Back]
-nologin Execute the appropriate shell, but not a login
shell. For csh, this causes .cshrc to be read,
but not .login.
-csh causes the output by userenv to be csh, rather
than sh, commands.
-t timeout Allows specifying the timeout value in seconds
before userenv gives up waiting for input. This
may be useful for users who have commands that
cause long delays in their login scripts. The
default is 10 seconds.
SEE ALSO [Toc] [Back]
xdm(1)
DIAGNOSTICS [Toc] [Back]
userenv returns 0 on success and nonzero if it was unable to
exexcute a login shell or find that environment.
Page 1 (printed 10/9/01)
USERENV(1) Silicon Graphics USERENV(1)
ENVIRONMENT VARIABLES [Toc] [Back]
ENVONLY
Page 2 (printed 10/9/01)
[ Back ]
|