[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: terminal colors



You can use ANSI escape sequences.

For instance, in my .bash_profile my prompt is defined as:

PS1="\[\033[1;33m\][\033[0m\]\[\033[1;32m\]\u\[\033[0m\]\[\033[1;34m\]@\[\033[0m\]\[\033[1;32m\]\h\[\033[0m\]:\w\[\033[1;33m\]]\033[0m\]\$ "

More information can be found here:
http://www.dreaming.org/~giles/bashprompt/howto/c341.html


-t



On a remote moon of Endor, Brian Fallik's voice echoed:
> Hi.  I'm having problems getting colors to appear in my BASH prompt in Woody
> (3.0).  This is on a fresh install I just finished today.  I've made very
> few changes to the system so far.
> 
> When I ssh (protocol v2) into my debian server, the prompt is monochrome.
> I've tried to export the TERM variable several times using xterm-color,
> linux, xterm-debian, and xtermc in .bashrc and .bash_profile.  I've also
> tried these same settings in the terminal-type string setting in putty.
> Nothing works.
> 
> However, once I'm ssh'ed into the server, if I su to the same account the
> bash prompt is in color.  echo $TERM produces the same output (the putty
> setting) in both cases.
> 
> Any suggestion on how to fix this?  I've scoured google, google groups, and
> debianhelp.org to no avail.  What are other good resources I can use to
> resolve this?
> 
> I don't subscribe to this list so please copy me directly on any replies.
> 
> Thanks,
> brian
> 
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> 

-- 
GPG fingerprint = 3FC5 2869 194C EE95 7A50  D482 5031 F8E7 E3C6 637C



Reply to: