LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-12-2003, 09:37 AM   #1
PaulBeton
LQ Newbie
 
Registered: Nov 2003
Location: Montreal, Qc, Canada
Distribution: Redhat 7.3 & 9
Posts: 3

Rep: Reputation: 0
Question Console colors how-to?


Hi there,
I would like to configure console tty colors to the old green like monochrome monitor terminal and I don't know how.
Where should I look to? terminfo? setterm? seems to work but as soon as I do a ls the colors are resetted to standard white.

ah by th way it's under Redhat 7.3 :d

Any suggestions?

Paul

<>
 
Old 11-12-2003, 09:52 AM   #2
Lostman
Member
 
Registered: Nov 2003
Location: Chicago, IL
Posts: 238

Rep: Reputation: 30
Are you using Konsole or some other console?

In Konsole you can adjust all that in the menu's. I don't have it in front of me now, but open it up, drop a few of the menu's down and you'll see it right there.
 
Old 11-12-2003, 10:10 AM   #3
PaulBeton
LQ Newbie
 
Registered: Nov 2003
Location: Montreal, Qc, Canada
Distribution: Redhat 7.3 & 9
Posts: 3

Original Poster
Rep: Reputation: 0
I'm not under X windows
it's under bash, text mode

thanks
 
Old 11-12-2003, 03:07 PM   #4
Jinkzer
LQ Newbie
 
Registered: Jun 2003
Location: Stockholm Sweden
Distribution: Gentoo, Slackaware, Flux, KDE
Posts: 20

Rep: Reputation: 0
You can do a lot of fun stuff from your .bash_profile.

To do what you want to do you could try the following:

cd ~ (go to your home directory)
vi .bash_profile (create it if it doesn't exist)
add the following lines to it:

PS1="\e[32;40;1m\u@\h:\w\$"
export PS1

save the file and run the command

source .bash_profile

or logout/login

The "\e[32;40;1m" string sets the forground(32)+background(40) color

To change it back to normal, just delete the .bash_profile.

<edit>
to make the ls color green too, add the line
alias ls='ls --color=no'
</edit>

Last edited by Jinkzer; 11-12-2003 at 03:16 PM.
 
Old 11-12-2003, 03:15 PM   #5
PaulBeton
LQ Newbie
 
Registered: Nov 2003
Location: Montreal, Qc, Canada
Distribution: Redhat 7.3 & 9
Posts: 3

Original Poster
Rep: Reputation: 0
thanks

it's funny cause it looks like ansi coded caracter
except that the prompt format have change; and there is this ~$ that trail that I hadn't before... :|


Paul
<>
 
Old 11-12-2003, 03:23 PM   #6
Jinkzer
LQ Newbie
 
Registered: Jun 2003
Location: Stockholm Sweden
Distribution: Gentoo, Slackaware, Flux, KDE
Posts: 20

Rep: Reputation: 0
Sorry about that

Change the line to

PS1="\e[32;40;1m\u@\h:\w#"

And you will get the normal # back at the end.

To try the settings before you add them to your profile you can do

echo -e "\e[33;44;1mHello World"

Don't get stuck with this all night now
 
  


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
console colors smartentity Linux - Newbie 6 08-03-2005 08:34 AM
icewm console no colors daspooky Slackware 2 11-25-2004 04:10 PM
colors in console??? alaios Linux - General 1 08-11-2004 08:11 PM
console colors ninadb Slackware 3 04-28-2004 03:31 AM
C and Console colors Gerardoj Programming 3 04-23-2004 12:47 AM


All times are GMT -5. The time now is 08:40 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