This document is a reference technical paper for the HEPiX scripts.
In order to provide a common user environment on UNIX Systems
a set of scripts was designed first by the DESY UNIX Commitee (DUX)
(see [9] which obsoletes
[2]).
These scripts are covering the user environment which includes
the shell environment and will include the graphical environment (X11)
in the future. The "startup scripts" (shell environment)
provide a way for users to login, work in interactive and batch mode
for the most common shells and platforms.
The following paper provides all files, environment and shell variables
commands, options, aliases or functions, extra things which are provided
by the HEPiX scripts and which can be customised.
The following levels are supported:
1 - HEP level,
2 - Site level (here it is CERN),
3 - System level,
4 - Cluster level,
5 - Group level,
6 - User level.
If you installed the HEPiX scripts in mode 1 (see [11]),
then when the shell reads the user dot files which should be the templates,
it will source the central-files. The central-files will detect that the
HEPiX scripts haven't been installed in enforced mode (mode 2) and they will
start to execute all the levels beginning with the HEP level. If there are
files at any level they will be sourced.
If you installed the HEPiX scripts in mode 2 (see [11]),
the shell (the good ones!!) start reading the wrappers which test
if you are allowed to go further. If yes, the shell will start the
HEPiX scripts levels from the HEP level up to the end. Then the shell
executes the user dot files and the user dot files will start sourcing
the central-templates files. The latter will recognise that the HEPiX scripts
have been executed already so they won't ``loop'' and the shell will
execute the end of the user dot files.
Note: No level is mutually exclusive. The numbers show in what order are called the levels. A level with a number n can redefine anything which had been set had level n - 1. So the user can redefine everything.
According to who you are you have the responsibility to maintain your
environment at your level. For instance, if you are administering
one machine you have the responsibility of the system level and you
can ``play'' with any file in /etc/hepix
.
Note: that the Cluster level looks like ``syntaxic suggar''.
It had been decided that (see [9]):
root never uses the HEP scripts,
all users with uid less than 100 don't use the HEP scripts,
all users who have their username in
/etc/hepix/list- don't use the HEP scripts.
We have subdivided the scripts in several files according to the schemes used
by tcsh and zsh because these shells provide the greatest flexibility
to assign scripts to the different cases mentioned above.
The HEP files are the main engine they are calling all the other files to
provide the hooks to the Site level files, set some variables, etc.
HEP_csh.cshrc
and HEP_zshenv
These two files are used to set the environment of the shell. They are
mainly providing almost all the useful environment variables.
HEP_csh.login
, HEP_profile
and HEP_zprofile
These 3 files are providing the login part of the shell, setting the terminal
line if connected to a terminal.
HEP_cshrc.rc
, HEP_tcshrc
, HEP_kshrc
, HEP_bashrc
and HEP_zshrc
These 5 files are setting some specific default for each shell. For instance,
setting some options, some shell variables, some aliases and/or functions,
etc.
*sys.conf.[c]sh
These files are used to set ONLY the environment variables. There are two
``twin'' files for eboth C-shell and Bourne shell flavour and one
is the translation of the other.
*env.[c]sh
These files are here to set the environnment part of the shell.
*aliases.[c]sh
These files are provided for you to give some aliases or functions.
*rc*
These files are here to put all other shell variables you need or other
options, etc. which affect the behaviour of the shell itself.
*login.[c]sh
These files are provided for you to set everything which occurs at login
time.
termset.[c]sh
These files are provided for term setting corrections
The following table shows the auxiliary files which are used to make the
HEPiX scripts accessible.
The next table gives the names of the files for each shell flavour, at each
level, which can be used to provide a customised environment which suites
to your needs.
So if you want to provide a customisation for the C-shells on the machine
you administer, you simply have to add lines in the files whose names
are in the column System level and in the raw C-shell.
Thus you can customise your environment using the following files in
/etc/hepix
for the C-shells:
sys.conf.csh
env.csh
tcshrc
cshrc.rc
aliases.csh
login.csh
Moreover, the user can use templates files. In each newly created account all the templates files for the customisation of
the shell are provided. Each user can edit these files using the examples
described in the previous section to customise their environments.
In these templates the user will find 3 parts:
1 - the header part which gives the address mail in case of serious problems,
the version number, the generation date, the authors, etc.
2 - the hook to the HEPiX scripts. This hook is not required if the HEPiX
scripts are installed in enforced mode. The user should anyway NEVER remove
these 3 lines for the C-shell users
if ( -r /usr/local/lib/hepix/central_env.csh ) then source /usr/local/lib/hepix/central_env.csh endifor the following lines for the Bourne-shells users:
if [ -r /usr/local/lib/hepix/central_env.sh ]; then . /usr/local/lib/hepix/central_env.sh fiThere might be slightly different but should look like them.
The protection of these files prevents the shell to loop, trying to ``re-execute'' the same files. It is usefully introduced to allow the installation mode 1 and mode 2 (see [11]).
This last command resets your terminal.
The following special interactive features of the shells will be enabled if possible:
In the zsh and tcsh you have also key bindings like the emacs key binding described later, especially for a history-search-backward and history-search-forward with the Page-Up/Prev-Page and Page-Down/Next-Page key and the Insert and Delete key, if present, work as expected.
The history file had been disabled.
The last 4 aliases enables the use of the arrow keys which is working
in xterm but not in hpterm.
The history file had been disabled. The history is not cached anymore into a file but in separated temporary files per session which are removedat the end of the session. It avoids nasty ksh bugs.
The history file is disabled.
Variables and parameters
Options.
The following options have been unset.
Because there are some connection programs on some systems which
read the ``message of the day'' file (/etc/motd
) it is not
possible to standardise easily. The default behaviour is to put this file
under /etc/hepix/motd
.
This commands tells you, the user, if you are ``exceeding'' your ``disk space''
quota limit. In order to have a feeling you can try:
> /usr/local/lib/hepix/quota-warn 10
Which means that if your quota will exceed 10
You can use this command in the LOGIN
part of your login dot files
(.profile
, .zprofile
, .login
, etc.).
One variable which should be set is the NNTPSERVER which indicates
which server should be contacted for news reading, posting, etc. This
variable is used by all known newsreaders.
For example, one could include the following line
setenv NNTPSERVER news.cern.chin the file /etc/hepix/sys.conf.csh.
One example of a variable which can be set for Mosaic is the WWW_HOME
variable. This variable could be made group dependent for example.
setenv WWW_HOME http://www1.cern.ch
You may define your own less commands by using the program lesskey to create a file called ".less" . This file specifies a set of command keys and an action associated with each key. The key bindings for less can be loaded with the -k option.
setenv LESS "-e -i -M -w -k/usr/local/lib/less/.less"For the explanation of the other options consult the man page for less.
The oracle environment is available. It can be set from the user
recommended templates by uncommenting a few lines.
It provides a list of variables which are mandatory to work with
oracle and to access the database. As it is not available on all the
platforms, you won't get it everywhere. Consult the Oracle support group
for more information.
All the commands which are used by the HEPiX srcipts given in alphabetic
order in each table.
Read 162 for a comparison between shells and 163 for a tutorial about
tcsh and zsh. The document 168 shows the differnent startup files used by
shells.
I got the following graphs on an IBM AIX v. 3.2 (@sys='rs_aix32'
).
Sequence of files called for csh.
Sequence of files called for tcsh.
Sequence of files called for sh.
Sequence of files called for ksh.
Sequence of files called for bash.
Sequence of files called for zsh.
Sequence of files called for csh on AIX.
Sequence of files called for csh on HP-UX.
Sequence of files called for csh on Solaris.
Sequence of files called for csh on Digital Unix.
Sequence of files called for csh on Silicon Graphics IRIX.
Sequence of files called for csh on SunOS.
Sequence of files called for csh on ULTRIX.
latex2html -split 0 -t "HEPiX Login Scripts - Implementation at CERN: ReferenceGuide" -no_navigation -info "" -show_section_numbers referenceguide.tex