LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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


Reply
  Search this Thread
Old 09-16-2004, 11:58 PM   #1
hitesh_linux
Member
 
Registered: Dec 2001
Location: /root
Distribution: FreeBSD,NETBSD,redhat
Posts: 472

Rep: Reputation: 30
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
 
Old 09-17-2004, 06:22 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

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


Reply



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 08:59 AM
VI Background Text Color mahugl Linux - Newbie 3 12-15-2013 10:12 PM
Change background color chingyenccy Linux - Newbie 6 01-23-2005 03:17 AM
ncurses background color gtanghookup Programming 1 09-02-2003 08:17 PM
ls = ls --color=tty KIRKR Linux - General 8 02-06-2002 04:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:35 AM.

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