From owner-freebsd-questions Thu Feb 7 21: 6:38 2002 Delivered-To: freebsd-questions@freebsd.org Received: from solomon.io.com (solomon.io.com [199.170.88.24]) by hub.freebsd.org (Postfix) with ESMTP id 78F0837B41A for ; Thu, 7 Feb 2002 21:06:32 -0800 (PST) Received: from aus-as2-123.io.com (aus-as2-123.io.com [199.170.89.123]) by solomon.io.com (8.11.2/8.11.2) with ESMTP id g1856Te15888; Thu, 7 Feb 2002 23:06:29 -0600 Date: Thu, 7 Feb 2002 23:09:23 -0600 (CST) From: Lars Eighner X-X-Sender: lars@dumpster.io.com Reply-To: Lars Eighner To: Bob Hall Cc: freebsd-questions@FreeBSD.ORG Subject: Re: toor retoor (was toor?) In-Reply-To: <20020207220755.B992@starpower.net> Message-ID: <20020207225240.W22136-100000@dumpster.io.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 7 Feb 2002, Bob Hall wrote: >I've got bash set up to display the account, host, and current path. >When I log in as toor, it shows the script source instead of the >account-host-path info. Does anyone know how to get this working for >toor? I believe root is *not* supposed to use sh, and toor may use bash if desired. Here is how I do the prompts in that case (note: ^[ here is actually the ESC character in the file, long lines are broken twice with \): if [ "$USER" = "root" ] then PS1="^[[=4A^[[1;41;37m$(date) sh:$(tty):$USER $(hostname) $(pwd)#^[[0m^[[=1C" export PS1 xcd() { cd $* ; PS1="^[[=4A^[[1;41;37m$(date) sh:$(tty):$USER $(hostname) $(pwd)#^[[0m^[[=1C" ; export PS1 ; } alias cd='xcd' fi if [ "$LOGNAME" = "toor" ] then PS1='^[[=4A^[[=0G^[[=7F^[[1;41;37m\d \t \s\v:\l:$LOGNAME\n/ \H\w\$^[[0m^[[=1C' export PS1 fi if [ "$UID" -ne 0 ] then PS1='^[[=9A^[[=0G^[[=7F^[[1;37;44m\d \t \s\v:\l:$LOGNAME\n/ \H\w\$^[[0m^[[=1C' export PS1 fi UID 0 prompts (root and toor) are white on red with a red frame around the screen, others are white on blue with a blue frame. As near as I know how to make them alike the prompts are Date shell:tty:logname hostname current path #/$ -- Lars Eighner eighner@io.com -finger for geek code- http://www.io.com/~eighner/index.html 700 Hearn #101 Austin TX 78703 (512)474-1920 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message