|
| Task: | Default and group environments |
| Group: | cms,toby,gdmr |
| Stage: | 1 |
Black
Default and group user environments will need to be configured; this includes both shell variables and X customisation.
At present AI users have to copy the centrally located fvwm init file to their home directory if they wish to modify the behaviour of the window manager. This is undesirable.
CS use a mechanism written by George Ross several years ago to initialise their shell environment. This is similar to Sys V's rc.* setup whereby a number of small initialisation files are harvested from various locations, sorted and run sequentially to set up the environment. One of the places in the search path is the user's home directory allowing user customisation of the environment.
The default window manager at CS is fvwm2 and is configured though a number of short files which are passed through cpp. Users can copy any of these files to their home directory and modify them though this facility is not activly advertised.
AI and CS vary the environment according to the group of the user. At AI only the $PATH and $PRINTER variables are affected. CS also modify $MANPATH and change the umask. Both sites have an alert mechanism which can differentiate on the basis of a user's group.
Issues
The current default DCS setup is based on the "fvwm2" window manager. This is looking rather dated, with the majority of students using more modern window managers, such as KDE. It would be adequate though.
As it stands, some aspects of the DCS mechanism are probably somewhat over-engineered for our needs. For instance , there are two mechanisms by which users can modify their setup, through the use of the .benv etc. files or by putting short scripts into the ~/share/bash directory. The existing mechanism has the ability to modify the user's setup on the basis of two environment variables, $GROUP and $ENVIRONMENT. Since $ENVIRONMENT is nearly always set to the value of $GROUP, it may be thought that the two mechanisms could usefully be folded into one. One exception to this general rule is if a .environment file exists in the user's home directory in which case $ENVIRONMENT is set to the contents of that file. This useful facility allows staff to test out the environments of other user groups and it is suggested that it be retained, albeit with its use restricted to those in group 'staff'
The use of kdm as the login manager will give users the opportunity to select the window manager they wish from a menu provided at the login screen. The list of available window managers will include at least KDE, Gnome, Fvwm2 and a fallback option which only starts up an xterm. We will need to provide support and a default setup for at least one window manager and, given that there seems little to choose between KDE and Gnome and that KDE seems more popular than Gnome within the Division, it would seem sensible to select KDE as our supported window manager.
KDE differs from older window managers in that it is configured mostly by a control panel rather than though various configuration files. Given that no two users will have the same preferences for the way their windows look and behave, we suggest that users should be provided with a minimalist windowing environment and left to set it up to their liking, something that is easy to do with the tools KDE provides. In particular, the somewhat overpopulated 'K' menu should have applications which we wouldn't wish the average user to have access to removed.
KDE's configuration is held in two directories in the user's home directory, .kde and Desktop. When KDE starts up, it checks if these directories exist and if they do not, creates them from the contents of two skeleton directories. This mechanism will be expanded to allow the different groups of users to have different initial setups. Computing staff for instance will probably wish to retain some of the entries removed from the 'K' menu for other groups.
Existing KDE users will of course already have these directories. Fortunately, the version of KDE currently in use in the division is KDE 1 and the version which comes with Red Hat 7.1 is KDE 2. We will therefore be able to detect if a user is using an old setup in the KDE startup script and modify it appropriately.
It is anticipated that once a user has been given the default setup, the only modifications we will wish to make globally or on a per group basis will be to the 'K' menu and (possibly) to the contents of the desktop. This can easily be accomplished, the default contents of the 'K' menu are held and can be modified centrally (or at least on a per-machine basis), similarly, the contents of the desktop can be modified by the use of central .xinitrc files. Once again, there should be no problem in modifying the KDE startup script to take account of a user's $ENVIRONMENT when consulting these files.
A setup such as described above should fulfil the joint ideals of giving the users freedom to mould the desktop environment to their liking while allowing us to retain the ability to modify this environment as needs dictate.
Users will use the same home directory on DICE and legacy machines. Given that the DICE version of Bash will use .bprofile, .benv and .brc as init file names rather than the default names, the old and new environments should be able to happily co-exist, .bashrc and the like being referenced on legacy machines and .brc etc. being used on DICE machines. The one group of users to whom this does not apply are those who continue to use the remaining legacy solaris machines at DCS. Further investigation is required into the extent of this problem
The discovery of the true state of affairs regarding how the DCS bash binary deals with .bashrc and .bash_profile files in the user's home directory poses a potential problem for the successful combining of DICE and legacy environments. In theory, the default ~/.bashrc and ~/.bash_profile files at AI and Cogsci should simply fall through (albeit with the Cogsci files printing out an error message) but we feel it would be more prudent to produce a Bash binary which behaves in a way corresponding to our original understanding, that is a Bash binary which ignores any .bashrc, .bash_profile, .bash_login and .profile files found in the user's home directory. The production of this binary and the corresponding RPM is a task which will have to be added to this group's tasklist.
It has been suggested that using .brc, .benv and .bprofile as the names of the user initialisation files rather than the standard .bashrc and .bash_profile may be an example of retaining elements of the legacy setup for no very good reason. It has been suggested that it might be preferable to accept the pain of moving to using the usual file names now for the sake of standardisation with the rest of the world.
In our view, the DCS names should be retained for the good reason that the usage of .bprofile and .brc does not correspond exactly to the use of .bash_profile and .bashrc by an unmodified version of Bash. For example when slogging into a remote host, the DCS mechanism would source the .brc file but the 'normal' version of Bash would not source the .bashrc file.
We need some mechanism for determining the group and normal location of the user. This could be encoded into the users GID but it seems probable that this will not be an acceptable mechanism under the DICE setup. It could also be stored in an init file in the user's home directory when the account is created. Care would have to be taken in the latter case to make sure that users were not able to gain privileges to which they were not entitled. Other ways of doing this may be available in the DICE environment.
Simon seems confident that this kind of information can be incorporated into the LDAP database. A notion of the role of the user (syssie, staff, ug1, ug2, ug3, ug4, msc, phd) and their default location (jcmb, sb, fh, bp, at) should be sufficient. Investigations are currently under way as to the best way of populating LDAP from the information held in the Division database.
We need to consult with academic staff regarding any requirements they may have for the students' setup.
|
Please contact us with any
comments or corrections.
Unless explicitly stated otherwise, all material is copyright The University of Edinburgh |
|