LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How change text color using linux in text mode only runlevel 3? (https://www.linuxquestions.org/questions/linux-general-1/how-change-text-color-using-linux-in-text-mode-only-runlevel-3-a-163814/)

Xavius 03-29-2004 01:01 PM

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?

trickykid 03-29-2004 01:18 PM

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

Xavius 03-29-2004 04:20 PM

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? ;)

trickykid 03-29-2004 04:32 PM

You try changing the foreground color as well using setterm? And what about the DIR_COLORS file?

CrippsFX 08-28-2006 10:53 AM

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 ...

bigrigdriver 08-28-2006 01:35 PM

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.

dracolich 08-28-2006 04:11 PM

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.

aloneattack 05-07-2009 02:19 AM

Please try:

Code:

setterm -foreground black -background white -store
more details here:
http://limestone.uoregon.edu/woven/H...lour-ls-6.html

:)


All times are GMT -5. The time now is 01:17 PM.