Arnaud Taddei
To Roger Jones Roger.Jones@mail.cern.ch and Alan Silverman alan@mail.cern.ch for their very good feed back and for improving my very bad English.
This document describes the new 3.0 version of the HEPiX scripts. The last production version was number 2.5.1.
This new version is a major new release of the HEPiX startup-scripts because it introduces the HEPiX X11 startup scripts beside the shell startup-scripts which are more well-known and much more mature now. The latter have been in production on several HEP sites since the end of 1994.
Because of the introduction of the HEPiX X11 scripts, a major reorganisation was necessary. The main consequence is that the /usr/local/lib/hepix directory have been re-organised and all the internal references have been reset. In previous versions, all the files were under /usr/local/lib/hepix which is unmanageable now.
The /usr/local/lib/hepix directory is structured in the following way:
#============================================ /usr/local/lib/hepix # The directory should contain only 9 | # files called "central" files and these files | # should stay there. | #============================================ |---X11 # All the files for the HEPiX X11 | | #-------------------------------------------- | |---hep # the hep level (main engine) | |---site # the site customisation | |---xdm # the xdm configuration hepix wrappers | #============================================ |---shells # All the files for HEPiX shells | | #-------------------------------------------- | |---hep # the hep level (main engine) | |---site # the site customisation | |---wrappers # the shells wrappers | #============================================ |---templates # The user templates | #============================================ |---tools # The auxiliary VERY useful tools! #============================================Warning: because of this new organisation, if you were using the HEPiX scripts in enforced mode, you must make a full installation of this new version in enforced mode to make sure that you are using the 3.0 shells wrappers. (For more information consult the sysadmin guide).
Why is it called "3.0"?
Usually people dislike a version when it is called .0 or beta It is called 3.0 because it is the first release of the X11 part and although it is workable and already in production on some machines, we don't yet know all the needs and users/system administrators wishes. Indeed, this version provides only few keyboard xmodmap settings and some aspects of the interface haven't been discussed yet (like the HX_ROOT_WINDOW major switch default, etc.). These are more "taste" problems and "cosmetic" aspects. The main point here is that the HEPiX X11 feature provides a powerful architecture and we can now build a decent default quite easily.
What is in this new version?
This version fixes some bugs and enables new features. Let's go through the components and list them:
rsh machine pp usernameyou received
pp: command not foundNow, it executes the `pp' alias which corresponds to a `grep' for `username' (in this example) on the output of the `ps' command.
Thus the aliases are accessible even in BATCH environment.
when you execute:
rsh machine echo \$ENVIRONMENTyou received
ENVIRONMENT: undefined variablenow, you receive:
BATCHThus, the terminal line is correctly checked and the variable ENVIRONMENT is set to BATCH if the shell is not connected to a terminal.
There was no setting of the "rc" part of the zsh Oracle
customisation. This had been now solved by the Oracle team. This is
a CERN specific feature.
tterm = valuereplaced by
tterm=valueof course!
all tests:
if [ -t ]; thenare replaced by
tty -s if [ $? ]; thento make them more portable. Indeed, AIX 4 doesn't support [ -t ] anymore but but rather
if [ -t 1 ]; theninstead. So, it is better to use a direct call to tty command.
TZ was set by the HEPiX scripts! This is wrong because this is
a very system dependent variable which must be set elsewhere.
The HEPiX
scripts should not set it and should not do anything about it.
Be aware that this variable is exported if you enable xdm.
If you notice that the date is wrong in your Xsession,
make sure you have:
DisplayManager*exportList: TZin the xdm-config file which is used by the xdm program. In principle it should be in /usr/sue/lib/xdm or in the xdm-config if you are using the CERN SUE system or the HEPiX make.pl command. Otherwise consult your vendor documentation to know which xdm-config file is used (usually /usr/lib/X11/xdm or /usr/openwin/lib/xdm for Sun architectures).
In the HEPiX X11 scripts, in the HEP_Xsession there is now
a detection of the existence of a .Delete or .BackSpace file
and the proper resources are set for the XTerm client:
XTerm*sttyModes: erase ^? for deleteor
XTerm*sttyModes: erase ^H for backspace
In UNIX system the login program provides a setting for USER but
doesn't tell you anything about your GROUP. You have to calculate it.
Moreover, if you belong to several groups, you cannot choose the
one from which you want to get a customisation.
There is a new command in the hepix/tools area, GroupName, which returns a group name on the command line. It is calculated in the following way:
In the past, the HEPiX scripts were common for any machine.
For robustness and security reasons the scripts are now compiled
for each target platform. They are now even preprocessed by an
equivalent program of cpp, hpp (hepix pre processor)
which is able to pre-process files where the comment symbol is not
/* but #.
Its capacity is weak but very convenient for this purpose.
The main consequences is that the scripts are lighter. Several 'case' statements have been removed, there are fewer lines and some heavy parsing algorithms disappeared.
Because of the growing number of 'dot' files in $HOME, it had been
decided to introduce a $HOME/.hepix directory, like you may have
a $HOME/.vue or $HOME/.dt directory, in order to store
all the 'HEPiX' only customisation files. This means that all
"standard files" are reside $HOME (.xsession, etc.)
and all the files introduced by the HEPiX environment are reside
$HOME/.hepix (xprofile, xkeyboard, xresources, xsession.log,
preferred-group, vm, etc.).
Because of the VM migration, in the CERN site customisation,
some aliases are provided to mimick the VM interface (logoff, etc.).
You can get these aliases by entering:
touch $HOME/.hepix/vmon the command line only once. If the file $HOME/.hepix/vm is readable (usually this is a 0 kB size file) then the HEPiX scripts (CERN) provide you these aliases.
Because of the choice on the PATH strategy, some useful SunOS commands
were not accessible. In order not to have to maintain yet another
set of softlinks on all SunOS machines, it has been decided to add
some aliases which give access to these commands.
On AFS accounts it is useful to know if your token is going to
expire. For tcsh and zsh only, the periodic command feature
have been enabled. Claudia Bondila (CERN) wrote
a tklife command (in /usr/local/lib/hepix/tools) which warns you
about token expiration. This command is then started periodically
by your shell (tcsh and zsh).
Because of the heterogeneous environment it has been decided that
AFS user accounts should have .@sys/bin directories and a link:
$HOME/bin --> $HOME/.@sys/binThe string `@sys' represents the current operating system value for the AFS file system. If you are currently using an AIX 3.2 platform, this value will be expanded to `rs_aix32' thus, in this context, the previous statement will be interpreted as being:
$HOME/bin --> $HOME/.rs_aix32/binby the system.
Of course $HOME/bin is in the PATH but we noticed that many users are writing "portable" interpretable scripts (perl, ksh, rexx) and we decided to introduce a $HOME/scripts directory which is as well in the PATH. Thus the latter becomes:
$HOME/bin:$HOME/scripts:$GROUPPATH:/usr/sue/bin:SYSTEM-PATH: /usr/local/bin:/usr/local/bin/X11:/cern/pro/bin:.
/afs/cern.ch/user/$INITIALE/$USER/spoolfilewhere $INITIALE is the first letter of the value of $USER. Otherwise it is the vendor mail spool file location which is given. Be careful, the $INITIALE variable is NOT maintained anymore as it is just a temporary variable.
X11BIN, DOMAINNAME, etc.These variables are only an INTERNAL meaning for the HEPiX scripts and their scope is limited. DOMAINNAME is calculated as the output of the domainname command. It is empty if the command is not present on the system.
The HEPiX X11 provides a reasonable default to the user through the so-called HEPiX Desktop (to be compared with the COSE/CDE, HP-VUE, etc. desktops). Although the session management is still poor, this setting is a way to solve resources problems caused by the too heavy COSE/CDE, HP-VUE, etc. desktops. It will evolve with the technology and might enable in the future a real X11R6 session manager (OK, this is one reason why it is "beta" as well!!).
Through the so-called Major Switches it is easy to customise the session at the user level or for a machine, a site, a group of users, etc. in the same way as it is possible with the HEPiX shell scripts. There is a way to control what is and is not allowed.
The major switch is the key idea for the customisation of the X11 environment. After a 4 months collaboration between CERN and DESY we finally managed to understand how a theoretical X session should be decomposed, and then we found a flexible way to handle this environment.
The XDM Xsession is decomposed into:
More on point 4: the session: the session is decomposed in the following way:
After these settings, if the -failsafe flag is raised the session fails into just one xterm.
If the load balancing mechanism is set to be xforward, then you should be switched onto another node (not implemented yet in the HEPiX X11 framework although exists at DESY-Hamburg T. Finnern has promised to separate the Xforward feature from the Xsession into an Xforward external command).
HX_WM # the window manager: fvwm, mwm, etc. HX_DESKTOP # the desktop: CDE, HP-VUE, DXSESSION,HEPIX HX_STARTUP # the startup script: .xsession, # HEP_xsession.default HX_LAST_CLIENT # the control or last client of the session # adam, xterm, window-manager, etc. HX_ROOT_WINDOW # the command which sends a root window # on your screen HX_KEYBOARD # the name of an xmodmap file HX_SOURCEPROFILE # do you want to source your # user profile files or not # (might be dangerous because of stty's)
start the desktop (use HX_DESKTOP) if HX_DESKTOP = HEPIX starts mandatory clients load resources start the startup scripts (use HX_STARTUP) if HX_STARTUP != .xsession provide fontpath setting provide keyboard mapping (from HX_KEYBOARD) start window manager (use HX_WM) load the root window start normal clients from ... $HOME/.hepix/xclients start last client (use HX_LAST_CLIENT)
There are templates for
This is done by the /usr/local/lib/hepix/tools/Xinfo program from T. Finnern. It provides HX_* variables which you can use to say for example:
if HX_VENDOR != "PC" then start mosaic, start ical, etc. fi
The command /usr/local/lib/hepix/tools/xsession-fake simulates what the session would do, without doing it. The log is in $HOME/.hepix/xsession.log (Don't forget you can run it through the uco command)
If you want to access CDE on a machine my-machine, then in xprofile, enter:
if [ $HOST = "my-machine" ]; then HX_DESKTOP="CDE" fi
If you want to access HP-VUE on any HP machine, then in xprofile, enter:
if [ $OS = "HP-UX" ]; then HX_DESKTOP="HP-VUE" fiAll of these things can be done at Site, system, cluster, group levels of course
Although you may not have the vendor default login panel, if you login as root or as a login user with uid < 100 or if your login name is in /etc/hepix/list- then you won't get HEPiX - X11
If they are detected, PC Xservers will have a special setting if these are Windows based Xservers.. Indeed HX_WM=local, because they are going to use Windows as a window manager which optimises the resources and integrates very well with Microsoft Windows. Of course if you prefer fvwm, then you can specify it.
There is a way to retrieve the available files which provide some keyboard mappings. At present there are very few files but the number should increase rapidly. Anybody can design such files (HEP, Site, ... Group, User). Here is an example of one of my files:
$HOME/.hepix/xkbd.NCD108arno !######################################################## ! File: $HOME/.hepix/xkbd.NCD108arno ! Description: This file contains xmodmap modifiers. ! Author: Arnaud Taddei ! Date: 03 october 1995 !+------------------------------------------------------- ! Keyboard: NCD108arno ! Xkeycaps closer name: Network Computing Devices N108 ! Mapping: ! Delete ----> BackSpace ! F12 ----> Delete ! 100 ----> Delete ! 9 ----> grave asciitilde ! 14 ----> Escape !-------------------------------------------------------- !######################################################## keysym Delete = BackSpace keysym F12 = Delete keycode 100 = Delete keycode 9 = grave asciitilde(Note you can display keyboard layouts with xkeycaps. The name in the field `Xkeycaps closer name' is the one used by xkeycaps. Then the file xkeyboard can map a Display value (IP number or fully qualified Xserver named: mish155.cern.ch) to a such a file (here the name would be NCD108arno)
The new assignments of port numbers are respected; the HEPiX scripts append a fontpath from the port 7100 of your XFontServers (which you can specify in a list).
The HEPiX-X11 customisation of xdm doesn't set MAGIC-COOKIE although the installation procedures gives some hints on how to do this. There are many reasons for not doing it with the HEPiX scripts and the best one is that, it is not the HEPiX scripts' role to setup the security (This is a very "system" level thing to do and requires some checks on some directories, etc. ).
Keep in mind that:
X11 templates
uco
The "User Companion" or the reset button if you messed up something in
your home directory.
The interface is completely new, much more verbose and displays menus.
You can operate on the following areas:
This tool should evolve and an Xclient interface may be provided, in order to have some kind of equivalent to the "Control Panel" on Windows.
Once installed enter
uco -hfor help.
make.pl
This command uses the same flags as before but has been completely
rewritten.
Enter ./make.pl -h for Help
Note as well that you can install the HEPiX scripts as joe user in your
HOME directory. Of course these would be better installed on the
system level (consult the help or the sysadmin guide).