Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 09-17-2004, 12:58 AM   #1
Registered: Dec 2001
Location: /root
Distribution: FreeBSD,NETBSD,redhat
Posts: 472

Rep: Reputation: 30
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...

Old 09-17-2004, 07:22 AM   #2
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,990

Rep: Reputation: 68
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.


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
tty background/foreground color neo77777 Linux - General 11 11-25-2014 09:59 AM
VI Background Text Color mahugl Linux - Newbie 3 12-15-2013 11:12 PM
Change background color chingyenccy Linux - Newbie 6 01-23-2005 04:17 AM
ncurses background color gtanghookup Programming 1 09-02-2003 09:17 PM
ls = ls --color=tty KIRKR Linux - General 8 02-06-2002 05:05 PM

All times are GMT -5. The time now is 11:44 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration