View previous topic :: View next topic |
Author |
Message |
WhO_KnOwS Tux's lil' helper
Joined: 03 Oct 2003 Posts: 87 Location: Slovenia
|
Posted: Fri Oct 17, 2003 4:09 pm Post subject: bash-2.05b$ --> user@home# |
|
|
I know that the topic title is a little odd, but I don't know how to name it in any other way. My question is the following:
In all Linux distros so far when I opened the konsole the prompt looked something like this "root@home#". It looks like this on the LiveCD as well. But in gentoo all I get is "bash-2.05b$". How can I change this?
P.S.: Please be specific as I am still trying to find myself in gentoo. _________________ "Does anybody know my name?" -me after a wild night |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Fri Oct 17, 2003 5:01 pm Post subject: |
|
|
WhO_KnOwS,
Look in your ~/.bashrc file.
Theres noy a lot there but in the bottom half it sets your xterm prompt.
Fiddle with that.
man bash may help too.
Regards,
NeddySeagoon _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Sefthuko n00b
Joined: 11 Jun 2003 Posts: 64
|
Posted: Fri Oct 17, 2003 5:08 pm Post subject: user@home |
|
|
Well, I know that if I run
Code: | source /etc/profile |
I get the root@home# prompt. So, a quick way of getting it would be to open up your ~/.bashrc and shove the above line of code in it somewhere.
If you want it to be global, I really don't know. I searched my hard drive, and there's a copy of .bashrc in /etc/skel... perhaps that's the default .bashrc file? Hope this helps. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54300 Location: 56N 3W
|
Posted: Fri Oct 17, 2003 5:33 pm Post subject: |
|
|
Sefthuko,
/etc/skel... is what is used to copy to new user accounts (if you want) when you create a new user.
Regards,
NeddySeagoon _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Cr0t l33t
Joined: 27 Apr 2002 Posts: 944 Location: USA
|
Posted: Fri Oct 17, 2003 5:45 pm Post subject: |
|
|
try that one... Code: | PS1="\[\033[0;36m\]\t\[\033[1;35m\]^\\[\033[0;32m\]\u\[\033[1;34m\]@\[\033[0;32m\]\\h\[\033[1;35m\]:\[\033[1;33m\]\w\[\033[0m\]\\[\033[1;34m\] > \[\033[0m\]" | _________________ cya |
|
Back to top |
|
|
manywele l33t
Joined: 12 Jul 2003 Posts: 739 Location: Inside
|
Posted: Fri Oct 17, 2003 8:15 pm Post subject: |
|
|
Quote: | try that one...
Code:
PS1="\[\033[0;36m\]\t\[\033[1;35m\]^\\[\033[0;32m\]\u\[\033[1;34m\]@\[\033[0;32m\]\\h\[\033[1;35m\]:\[\033[1;33m\]\w\[\033[0m\]\\[\033[1;34m\] > \[\033[0m\]" |
You know, I've seen things like this on the forums for changing colour and content of prompts. But I have yet to find an explanation, even in man bash, for what all those backslashes, numbers and letters do. Can someone point to a place that makes all that obscure stuff understandable? |
|
Back to top |
|
|
NuclearFusi0n Apprentice
Joined: 20 Jun 2003 Posts: 297
|
Posted: Fri Oct 17, 2003 8:18 pm Post subject: |
|
|
export PS1="\[\033[1;36m\]\w\n\[\033[1;32m\]\u@\h: \[\033[1;34m\]\[\033[37m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') files \[\033[1;33m\]\$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')b\[\033[0m\] \\$ \[\033[00m\]" _________________ I will keel yoo grub |
|
Back to top |
|
|
Brandy Bodhisattva
Joined: 08 Jun 2003 Posts: 820 Location: New Zealand
|
Posted: Sat Oct 18, 2003 12:27 am Post subject: |
|
|
Moved from Other Things Gentoo to Duplicate Threads. There is a rather nice thread about the konsole prompt here. A lot of information about colour codes (among other things) in bash can be found here. _________________ Faber est suae quisque fortunae. |
|
Back to top |
|
|
|