LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   TTY background color! (http://www.linuxquestions.org/questions/linux-general-1/tty-background-color-231633/)

hitesh_linux 09-16-2004 11:58 PM

TTY background color!
 
Hi,

I want to change tty default background color(black). I mean to say When we login through console(Ctrl +Alt+ F1 or F2) we got black background as default. i want to change that color with other color. is it possible? if, how can i change it other color.

Thanx in Adv...

-Hitesh

rjlee 09-17-2004 06:22 AM

You can change the background colour when the login message is displayed.

Probably the easiest place to put this is in /etc/motd, where it will get executed just after logging in. The colour will revert to the hardware default (black) if you do something like reset the terminal though.

Basically, you need to output the ANSI colour escape sequence for “set background colour” and then for “clear screen”. Try a google search for “ANSI Escape sequences” for a list of what the codes are.

Something like <ESC>[47m<ESC>[2J (where <ESC> is the ASCII ESCAPE character) will do it.


All times are GMT -5. The time now is 03:22 PM.