View previous topic :: View next topic |
Author |
Message |
cgmd Veteran
Joined: 17 Feb 2005 Posts: 1585 Location: Louisiana
|
Posted: Sat Jan 13, 2007 2:55 pm Post subject: [Solved] How is color of CLI "user@computername" e |
|
|
Hi, all...
When I use the cli on several different gentoo boxes, it would be nice for each box to have it's own distinct color for the computername@user, as it is displayed within it's terminal command line.
On a gentoo system, how can I alter the default color?
Thanks! _________________ "Primum non nocere" ---Galen
Last edited by cgmd on Sat Jan 13, 2007 8:46 pm; edited 2 times in total |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54308 Location: 56N 3W
|
Posted: Sat Jan 13, 2007 3:02 pm Post subject: |
|
|
cgmd,
Its set on a per user basis, in each users .bashrc file
Play with the value _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
cgmd Veteran
Joined: 17 Feb 2005 Posts: 1585 Location: Louisiana
|
Posted: Sat Jan 13, 2007 6:35 pm Post subject: |
|
|
NeddySeagoon wrote: Quote: | Its set on a per user basis, in each users .bashrc file
Play with the
Code:
"\033
value |
Got it!
Thanks, once more, NeddySeagoon _________________ "Primum non nocere" ---Galen |
|
Back to top |
|
|
zietbukuel l33t
Joined: 30 Dec 2005 Posts: 607
|
Posted: Sat Jan 13, 2007 7:35 pm Post subject: Re: [Solved] How is color of CLI "computername@user&quo |
|
|
cgmd wrote: | Hi, all...
When I use the cli on several different gentoo boxes, it would be nice for each box to have it's own distinct color for the computername@user, as it is displayed within it's terminal command line.
On a gentoo system, how can I alter the default color?
Thanks! |
Its. user@computername ... |
|
Back to top |
|
|
cgmd Veteran
Joined: 17 Feb 2005 Posts: 1585 Location: Louisiana
|
Posted: Sat Jan 13, 2007 8:45 pm Post subject: |
|
|
zietbukuel wrote: Quote: | Its. user@computername ... |
I stand corrected...
Thanks! _________________ "Primum non nocere" ---Galen |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54308 Location: 56N 3W
|
Posted: Sat Jan 13, 2007 8:58 pm Post subject: |
|
|
cgmd,
The prompt can be anything you want - its fully programmable,so if you want to have computername@user, go ahead _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
StarDragon Guru
Joined: 19 Jun 2005 Posts: 390 Location: tEXas
|
Posted: Wed Jan 24, 2007 7:31 pm Post subject: |
|
|
Does anyone know if there is a way to get the time display there? I think there used to be thread with that info but I can't find it _________________ "After all, a person's a person, no matter how small."--Horton Hears A Who! |
|
Back to top |
|
|
cgmd Veteran
Joined: 17 Feb 2005 Posts: 1585 Location: Louisiana
|
Posted: Thu Jan 25, 2007 3:57 am Post subject: |
|
|
StarDragon...
The user command prompt characteristics are defined in ~/.bashrc.
My .bashrc uses the following entry: Code: |
# PS1 is the regular prompt.
# Substitutions include:
# \u username \h hostname \w current directory \t time in 24h format
# \! history number \s shell name \$ $ if regular user \T time in 12h format
PS1="\[\033[01;34m\]\u\[ \][\t] \[\033[01;35m\]\w \$ \[\033[00m\]" |
The prompt is "PS1=", and with it's switches (as well as various color definitions) can be modified to your liking. My prompt looks like: Code: | cgmd [21:45:04] ~ $ |
The time (in 24h format) is established by the switch [\t].
I'm not an expert, but I hope that helps! _________________ "Primum non nocere" ---Galen |
|
Back to top |
|
|
|