I'm sponsoring this open case for Roland Mainz it is number 1 in a series of 4 cases addressing the default shell environment.
Template Version: @(#)sac_nextcase %I% %G% SMI 1. Introduction 1.1. Project/Component Working Name: Default shell environment: machine ksh93/back environment 1.2. Name of Document Author/Supplier: Author: Roland Mainz 1.3 Date of This Document: 25 April, 2007 4. Technical Description Default shell environment enhancements: machine ksh93/bash environment Description and Justification: This case proposes to introduce a set of enhancements for the default shell environment in Solaris to provide a more user-friendly environment for new users which are not yet familar with all the details in Unix and to provide some help for adminstrators via introducing better system-wide defaults and more configuration options. The proposed changes are: - A change to "/etc/ksh.kshrc" which sets the default prompt (PS1) for interactive ksh93 shell sessions to a value which displays the username, hostname and current working directory and a "$ "-seperator for normal users and "# " with the login name "root" (this follows the default of SuSE Linux and aims at improving the usalibity for novice unix users), e.g. setting the prompt to $ PS1='${logna...@$(hostname):${PWD/~(El)${HOME}/\~}\$ ' # will result in the following prompt (for user "gisburn" on machine "jupiterb48" with CWD="/home/gisburn/solaris/"): -- snip -- gisburn at jupiterb48:~/solaris$ -- snip -- If the prompt setting (PS1) is not desired as the default, the "/etc/ksh.kshrc" file may be changed by the system administrator, or the user may turn off or reset the prompt in their per-user "~/.kshrc" configuration file, which is executed after "/etc/ksh.kshrc". - "/etc/bash.bashrc" as new file to the system, as a per-system configuration file for interactive bash (Bourne Again Shell). This file works the same way like ksh93's "/etc/ksh.kshrc" (except this one is for the bash shell), e.g. "/etc/bash.bashrc" is sourced before the per-user file "~/.bashrc". The purpose of this file is to provide an admin-customizeable way to set a system-wide defaults interactive bash shell sessions. The default line-editing mode will be set to "gmacs" to match the behaviour of ksh93 (see PSARC 2007/587) and the default prompt (PS1) will be set to to a value which displays the username, hostname and current working directory and a "$ "-seperator for normal users and "# " for uid 0 (this follows the default of SuSE Linux and the default for ksh93 as proposed above). If the "gmacs" editor mode or prompt setting (PS1) is not desired as the default, the "/etc/bash.bashrc" file may be changed by the system administrator, or the user may turn off or reset the editing mode and/or prompt in their per-user "~/.bashrc" configuration file, which is executed after "/etc/bash.bashrc". Note that "/etc/bash.bashrc" is only used in bash initialization; it has no effect on other shells. - "/etc/bash.bash_logout" as a new file to the system as a per-system configuration file for bash login shells. This file is executed at logout time for bash shells which were used as login shell. The current file content should be a file with comments only (for now). Interfaces: (note that both "/etc/bash.bashrc" and "/etc/bash.logout" are delivered via OS/Net to keep the files at the same place as their ksh93 counterparts and "/etc/profile"). Interface Stability Description ========= ========= =========== shell-var "PS1" Committed Shell variable to define the prompt for POSIX(-like) shells /etc/ksh.kshrc Uncommitted Per-system configuration file for interactive ksh93 sessions /etc/bash.bashrc Uncommitted Per-system configuration file for interactive bash sessions /etc/bash.logout Uncommitted Per-system configuration file bash login sessions, executed at user logout time. References: 1) Korn Shell 93 Integration external PSARC case which adds /etc/ksh.kshrc http://www.opensolaris.org/os/community/arc/caselog/2006/587/ 6. Resources and Schedule 6.4. Steering Committee requested information 6.4.1. Consolidation C-team Name: ON 6.5. ARC review type: FastTrack -- Darren J Moffat