[mythtv-users] xterm prompt configuration

Jarod Wilson jarod at wilsonet.com
Thu Jul 23 20:03:35 UTC 2009

On Jul 23, 2009, at 3:57 PM, H P Ladds wrote:

> How do I customize the Xterm prompts in knoppmyth? I'd like the prompt
> to show the current user.

Not really the right place to ask this, if you ask me, but I use the  
following in ~/.bashrc for my own boxes:

# color prompt
PS1='['$GREEN'\u'$BLUE'@\h '$RED'\W'$BLACK']\$ '
export PS1

The \u part is user, \h is host, \W is working directory. Somewhere or  
another, I've got a more complete version of this that goes in /etc/ 
profile.d/ and sets a different color if uid == 0, so as to give a  
visual clue when logged in a root... Oh, and BLACK isn't actually  
black, its whatever your console text color is, iirc.

Jarod Wilson
jarod at wilsonet.com

More information about the mythtv-users mailing list