Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] How is color of CLI "user@computername" edited?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
cgmd
Veteran
Veteran


Joined: 17 Feb 2005
Posts: 1585
Location: Louisiana

PostPosted: Sat Jan 13, 2007 2:55 pm    Post subject: [Solved] How is color of CLI "user@computername" e Reply with quote

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
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54308
Location: 56N 3W

PostPosted: Sat Jan 13, 2007 3:02 pm    Post subject: Reply with quote

cgmd,

Its set on a per user basis, in each users .bashrc file
Play with the
Code:
 "\033
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
View user's profile Send private message
cgmd
Veteran
Veteran


Joined: 17 Feb 2005
Posts: 1585
Location: Louisiana

PostPosted: Sat Jan 13, 2007 6:35 pm    Post subject: Reply with quote

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 :D
_________________
"Primum non nocere" ---Galen
Back to top
View user's profile Send private message
zietbukuel
l33t
l33t


Joined: 30 Dec 2005
Posts: 607

PostPosted: Sat Jan 13, 2007 7:35 pm    Post subject: Re: [Solved] How is color of CLI "computername@user&quo Reply with quote

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 ... :wink:
Back to top
View user's profile Send private message
cgmd
Veteran
Veteran


Joined: 17 Feb 2005
Posts: 1585
Location: Louisiana

PostPosted: Sat Jan 13, 2007 8:45 pm    Post subject: Reply with quote

zietbukuel wrote:
Quote:
Its. user@computername ... :wink:


I stand corrected...

Thanks!
_________________
"Primum non nocere" ---Galen
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54308
Location: 56N 3W

PostPosted: Sat Jan 13, 2007 8:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
StarDragon
Guru
Guru


Joined: 19 Jun 2005
Posts: 390
Location: tEXas

PostPosted: Wed Jan 24, 2007 7:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
cgmd
Veteran
Veteran


Joined: 17 Feb 2005
Posts: 1585
Location: Louisiana

PostPosted: Thu Jan 25, 2007 3:57 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum