LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-12-2003, 12:04 PM   #1
JCScoobyRS
Member
 
Registered: Dec 2002
Location: It's a Secret
Distribution: Gentoo
Posts: 79

Rep: Reputation: 15
Configure Bash 2.05b


I have just installed Gentoo, and boy what a long process that was, and I would like to modify my "console" to suit my likings. How can I get information on modifying what the prompt text/color is for bash? Right now, it's "bash-2.05b#" for all non-root users and "gentoo directory #" for root user where gentoo is red and directory is blue. Can someone help me find this documentation? I know that I have to export in my /etc/profile and there is even one already in there, with the code to only highlight for root user, but I would like to see all options I have instead of just the one defaulted by gentoo. Thanks, Jeremy
 
Old 12-12-2003, 12:16 PM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
http://www-106.ibm.com/developerwork.../l-tip-prompt/

Also a thread around here about 'What's your prompt look like?' and 'man bash'. ~/.bash_profile and ~/.bashrc are key after /etc/profile. Also /etc/DIR_COLORS and ~/.dir_colors. 'man dircolors' for some good stuff there. Hard to be real specfic - only you know if you want xml files to be chartreuse.
 
Old 12-12-2003, 12:16 PM   #3
Projekt2
Member
 
Registered: Sep 2003
Location: Naples, Fl
Distribution: Slackware Current
Posts: 34

Rep: Reputation: 15
Here is a link to an article written by, none other than, the President-CEO of Gentoo Technologies, Daniel Robbins. This sould get you well on the way to configuring your own bash prompt, or just copy one of Danials. I personally like the one that puts the current working directory and hostname in the title bar.
 
Old 12-12-2003, 12:21 PM   #4
Projekt2
Member
 
Registered: Sep 2003
Location: Naples, Fl
Distribution: Slackware Current
Posts: 34

Rep: Reputation: 15
ha ha

digiot beat me to it. I linked to the same article.
 
Old 12-12-2003, 12:24 PM   #5
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
The titlebar's one of my favorites, too. It's cool not wasting space on the current directory but not having to type 'pwd' to see it, either.
 
Old 12-12-2003, 12:28 PM   #6
JCScoobyRS
Member
 
Registered: Dec 2002
Location: It's a Secret
Distribution: Gentoo
Posts: 79

Original Poster
Rep: Reputation: 15
Thanks a lot all.
 
Old 12-12-2003, 01:10 PM   #7
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
if you are using kde I did this: on the konsole icon>>r-click>>properties>>execute>>under command enter konsole --ls
 
Old 12-12-2003, 02:16 PM   #8
JCScoobyRS
Member
 
Registered: Dec 2002
Location: It's a Secret
Distribution: Gentoo
Posts: 79

Original Poster
Rep: Reputation: 15
Well...I have my bash prompt looking the way I want but now, I need to figure out how to make it work like Red Hat does. In Red Hat, you can do "ls -a" and the files are colored depending on the type of file they are and the permissions. Can someone help me out or point me in the proper direction regarding this? Thanks, Jeremy
 
Old 12-13-2003, 01:24 AM   #9
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
I don't know how Red Hat does it specifically, but that's where dircolors probably comes in - and it may be a combination of putting aliases in the bash configs, as well. 'ls -a' is standard but if you want the 'll's and so on, those would be aliases and the coloring of the files would be configured through dircolors. Between what the prompt configuring said about colors and what's in /etc/DIR_COLORS, it's pretty straightforward.
 
Old 12-15-2003, 05:44 PM   #10
JCScoobyRS
Member
 
Registered: Dec 2002
Location: It's a Secret
Distribution: Gentoo
Posts: 79

Original Poster
Rep: Reputation: 15
In "/etc/profile" I added an alias for ls to be:

alias ls="ls --color"

That fixed it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
$LINENO can't be modified in bash 3.0, while it can be in bash 2.05b Darwish Linux - Software 1 11-07-2005 03:57 PM
bash-2.05b$ instead of user@domain after upgrading...also...no more quotes. RoaCh Of DisCor Slackware 3 12-17-2004 12:17 AM
root turned to bash-2.05b renegadeavenger Linux - Newbie 2 07-24-2004 10:43 PM
why did bash 2.05b install delete /bin/bash & "/bin/sh -> bash"? johnpipe Linux - Software 2 06-06-2004 07:42 PM
bash-2.05b# Xlib: extension "XFree86-DRI" missing on display ":0.0". citrus Linux - General 8 02-22-2004 11:43 AM


All times are GMT -5. The time now is 02:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration