Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-29-2004, 01:01 PM
|
#1
|
Member
Registered: Mar 2004
Posts: 107
Rep:
|
How change text color using linux in text mode only runlevel 3?
How I can change the text color (and the background color) with linux at runlevel 3?
|
|
|
03-29-2004, 01:18 PM
|
#2
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Your looking for setterm command, read the man page here:
http://man.linuxquestions.org/index....ction=0&type=2
And if you want to change the default colors of directories, media files, etc, check your DIR_COLORS in /etc
|
|
|
03-29-2004, 04:20 PM
|
#3
|
Member
Registered: Mar 2004
Posts: 107
Original Poster
Rep:
|
Thanks a lot trickykid
your solution seems to work... but if I use some commands like (for example) ls, after the text will have stardard color.....
I was searching something for change the text permanently.........
Have you another trick?
|
|
|
03-29-2004, 04:32 PM
|
#4
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
You try changing the foreground color as well using setterm? And what about the DIR_COLORS file?
|
|
|
08-28-2006, 10:53 AM
|
#5
|
LQ Newbie
Registered: Aug 2004
Location: Canada
Distribution: Debian
Posts: 5
Rep:
|
trickykid, it seems as though you are misunderstanding.
He does not want to change the color in a terminal ... he wants to change the color of the foreground text in the console ... for example: when I'm not running X, I want the console to display green by default.
I'm looking for the same thing too ...
|
|
|
08-28-2006, 01:35 PM
|
#6
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
I don't know how other distros handle it, but in SuSE, there is a folder (/etc/bootsplash/themes/SuSE/config) containing config files that can be edited to change foreground and background colors.
I expect other distros have something similar. Might take a bit of searching to find it.
|
|
|
08-28-2006, 04:11 PM
|
#7
|
Senior Member
Registered: Jul 2005
Distribution: Slackware
Posts: 1,274
Rep:
|
I don't know if your distro works the same as mine - or if this is what you're looking for. I added a file to my home directory called .profile with the line to change the text color to red.
[QUOTE]export PS1='\[\033[0;31m\][\u@\h:\w]\$ \[\033[0;37m\]'[\QUOTE]
This makes the prompt red (0;31) with the prompt text as username@hostname:workingpath$ and then resets the color to gray (0;37). So if you wat it to stay red while you type just leave off the \[\033[0;37m\]. I don't remember where I found the numbers for the colors but after you find them just plug them into the line above. I don't know if this affects the output of commands such as ls. And this is user-specific so this only affects the user who has this file in their home directory.
|
|
|
All times are GMT -5. The time now is 11:29 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|