-   Linux - General (
-   -   TTY background color! (

hitesh_linux 09-17-2004 12:58 AM

TTY background color!

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


rjlee 09-17-2004 07: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 08:27 PM.