Hi John, In the meantime, I think this /etc/profile hack might be nice to include in the Getting Started Guide (could be a nice start to a new section on shells). Instructions for accessing the source for the guide and contributing are here if you're interested:
http://opensolaris.org/os/project/indiana/documents/ We only recently set up the docs1 repository, so let us know if you have any questions or problems. You can find tools and style tips here http://opensolaris.org/os/community/documentation Thanks, Michelle Olson OpenSolaris Documentation Community Leader John Tracy wrote: > Hello All- > I recently installed Developer Preview 2, and was pleasantly surprised when a > bash shell greeted me by default. I was wondering, however, if we may change > the default prompt to be something a bit more useful than just "bash3.2$". > One of the first things I do when deploying a copy of Solaris is to hack the > /etc/profile file to make my prompt a bit more useful, containing my present > working directory and the hostname. This is the default in a lot of Linux > distributions, and if the point is to bridge the gap, I think this would be a > good starting point. I'm including my settings i use in /etc/profile as a > starting point, if anybody is interested. > > The settings below would make a prompt look like this: > [EMAIL PROTECTED]:/var/tmp# > > My apologies if this has already been hashed out before in this group. I > don't recall having seen any discussions on this topic previously. > > And, I hope I'm not stepping on anybody's toes or starting a religious > flamewar. I know different folks like different prompts. I couldn't care less > if you don't like mine--however I do think we should make an effort to make > the prompt at least a little more informative than what is currently is. > > Cheers- > John Tracy > > #ident "@(#)profile 1.19 01/03/13 SMI" /* SVr4.0 1.3 */ > > # The profile that all logins get before using their own .profile. > > trap "" 2 3 > export LOGNAME PATH > > if [ "$TERM" = "" ] > then > if /bin/i386 > then > TERM=sun-color > else > TERM=sun > fi > export TERM > fi > > # Login and -su shells get /etc/profile services. > # -rsh is given its environment in its .profile. > > case "$0" in > -sh | -ksh | -jsh | -bash) > > if [ ! -f .hushlogin ] > then > /usr/sbin/quota > # Allow the user to break the Message-Of-The-Day only. > trap "trap '' 2" 2 > /bin/cat -s /etc/motd > trap "" 2 > > /bin/mail -E > case $? in > 0) > echo "You have new mail." > ;; > 2) > echo "You have mail." > ;; > esac > fi > esac > > # Let's set our default paths so things actually run > > #First set path to files which should only be run by root > if [ "`/usr/xpg4/bin/id -u`" -eq 0 ]; then > PATH=${PATH}:/sbin:/usr/sbin > fi > > # Now let's set paths that everybody should have > > PATH=/bin:/usr/ccs/bin:/opt/SUNWspro/bin:/usr/local/bin:${PATH}:/usr/sfw/bin:/usr/dt/bin:/usr/openwin/bin > export PATH > > # Make our prompt pretty > PS1='[EMAIL PROTECTED]:\w\$ ' > export PS1 > > # Set some options to keep us from making mistakes > set -o noclobber > alias cp='cp -i' > alias mv='mv -i' > > # Let's change to VIM for our default editor > alias vi=vim > EDITOR=vim > export EDITOR > > # Let's have pretty directory listings > #alias ls='/usr/local/bin/ls' > umask 022 > trap 2 3 > > cc=/opt/SUNWspro/bin/cc > CC=/opt/SUNWspro/bin/cc > export CC > export cc > -- > > This message posted from opensolaris.org > > _______________________________________________ > indiana-discuss mailing list > [email protected] > http://mail.opensolaris.org/mailman/listinfo/indiana-discuss > _______________________________________________ indiana-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/indiana-discuss
