Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
bash-2.05b$ --> user@home#
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
WhO_KnOwS
Tux's lil' helper
Tux's lil' helper


Joined: 03 Oct 2003
Posts: 87
Location: Slovenia

PostPosted: Fri Oct 17, 2003 4:09 pm    Post subject: bash-2.05b$ --> user@home# Reply with quote

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


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

PostPosted: Fri Oct 17, 2003 5:01 pm    Post subject: Reply with quote

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


Joined: 11 Jun 2003
Posts: 64

PostPosted: Fri Oct 17, 2003 5:08 pm    Post subject: user@home Reply with quote

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


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

PostPosted: Fri Oct 17, 2003 5:33 pm    Post subject: Reply with quote

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


Joined: 27 Apr 2002
Posts: 944
Location: USA

PostPosted: Fri Oct 17, 2003 5:45 pm    Post subject: Reply with 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\]"
8)
_________________
cya
    ©®0t
Back to top
View user's profile Send private message
manywele
l33t
l33t


Joined: 12 Jul 2003
Posts: 739
Location: Inside

PostPosted: Fri Oct 17, 2003 8:15 pm    Post subject: Reply with quote

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


Joined: 20 Jun 2003
Posts: 297

PostPosted: Fri Oct 17, 2003 8:18 pm    Post subject: Reply with quote

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


Joined: 08 Jun 2003
Posts: 820
Location: New Zealand

PostPosted: Sat Oct 18, 2003 12:27 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads 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