Linux wiki

How To Set (Or Reset) Initial Terminal Colors?

The following shell script should work for VGA consoles:

 for n in 1 2 4 5 6 7 8;
 do
   setterm -fore yellow -bold on -back blue -store > /dev/tty$n
 done

Substitute your favorite colors, and use /dev/ttyS$n for serial terminals.

To make sure they are reset when people log out (if they've been changed):

Replace the references to getty (or mingetty or uugetty or whatever) in /etc/inittab with references to /sbin/mygetty.

 #!/bin/sh setterm -fore yellow -bold on -back blue -store > $1
 exec /sbin/mingetty $@

[Jim Dennis]

Why Are My Programs So Large?
Why Are the Timestamps on Files on MS-DOS Partitions Set Incorrectly?

 

See our index for more reviews

Write a review and win an Apple Ipod

Page

New
Edit
Rename
Attachments
Versions

Site

Changes
Index
Search

User

Log In

 
 

Last Modified 2004-07-02