Dennis Robertson <[EMAIL PROTECTED]> wrote: > On Sat, 25 Oct 2003 20:00, Barry Marler wrote: >> I may as well add that you'll have to re-source .bashrc, a la: >> >> source ~/.bashrc (or simply . ~/.bashrc). >> >> On Sat, 2003-10-25 at 05:55, Barry Marler wrote: >> > Append >> > >> > PS1='\[\033[01;31m\]\h \[\033[01;34m\](\w) \$ \[\033[00m\]' >> > >> > to ~/.bashrc. > > Hello Barry, > Following your advice I get: dencar (~) $ at the prompt. The aterm titlebar > reads: [EMAIL PROTECTED]:~ which is correct. Can you help further with the prompt > to have it specify user dennis, please. TIA. BTW there is a script in > ~/.bashrc to change the window title of X terminals, which I assume is > producing the titlebar entry I mentioned.
Read the Bash Prompt How-To at <http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/>, and pay close attention to 2.4-2.6. This way, you'll be able to set your prompt to anything you like without resorting to typing alien commands that make no sense to you. On my Gentoo system, I noticed that the prompt looked great for login shells and screen sessions, but not terminals. The source of the discrepancy is the fact that the PS1 environment variable, which controls the appearance of your prompt, was being set in /etc/profile, which IIRC is only sourced for login shells. The solution is to, as Barry already pointed out, add an appropriate line to your .bashrc, which is sourced for all shells. Others have suggested hacks to /etc/profile, but I believe Barry's solution is "cleaner". HTH, Eamon -- [EMAIL PROTECTED] mailing list
