Getting those purdy ANSI colors back in RH9/RH8NOTE: This is the content of a page originaly located here: http://www.frozenblue.net/tools/howtos/?v=redhat-8-console-fonts&op=printable
I've mirrored the content becuase this "feature" in RedHat 8/RedHat 9 really bugs me, and I can never find this info when I need it. :) If you are the original owner of this content, and don't like the fact I've mirrored it in an effort to help the community, please contact me and I'll remove it ASAP.
|
Bright/Bold Console Colors and "Normal"
Characters in Redhat 8.0 HOWTO
"Chipster"
v1.00, October 2002
This document explains how to fix the horrible-looking terminal fonts
in RedHat Linux 8.0 to look nicer like the 7.x days.
The problem(s)
As some of you Redhat 8.0 users may notice, the console colors
are MUCH darker than any Redhat predecessor. Unfortunately, this
was by design, and in my opinion, it is quite undesireable.
The RELASE-NOTES in the root of the
Redhat 8.0 distribution states:
"On the console, the latarcyrheb-sun16 font
is used for best Unicode coverage. Due to the use of this font, bold
colors are not available."
Some of you may find the font colors/lack of bold font as
problematic as I did, so I am going to show you how to get your
nice, bright, and bold fonts back in your console.
Some of you may also notice some odd characters in the
console. This is also due to the new Unicode support. Since I am
100% pure English-speaking, I need not international support, and
don't want those odd characters in my term. Some of you may
not either - so I will explain how to fix that as well.
The Cure(s)
Here I will show you how to get your bold/bright console font
styles back to the Redhat 7.x configuration.
1. - Fix the global font
[Ed: In RH9, this file doesn't exist, however, it can simply be created, and it will work. Update: I just did another RH install on my desktop, and this file appears to be there. Don't know why it wasn't on my laptop...]
The first thing you will want to work on is the
/etc/sysconfig/i18n file. This is where
the global system font is configured.
There are very little changes to the file. They are displayed
in the figure below:
| /etc/sysconfig/i18n |
# Chip: Using RH 7.x font value to get bold support
# SYSFONT="latarcyrheb-sun16"
SYSFONT="lat0-sun16"
SYSFONTACM="iso15"
|
2. - Fix the bootup screen
The next file you will need to edit has more changes that need to
be made to it, yet, is still rather simple.
This is the startup sequence console configuration (this is
the file that allows you to see the [ OK
] at bootup). You will be editing
/etc/sysconfig/init. The changes are
displayed in the figure below:
| /etc/sysconfig/init |
# terminal sequence to set color to a 'success' color (currently: green)
# Chip: Use bold sequence
# SETCOLOR_SUCCESS="echo -en \\033[0;32m"
SETCOLOR_SUCCESS="echo -en \\033[1;32m"
# terminal sequence to set color to a 'failure' color (currently: red)
# Chip: Use bold sequence
# SETCOLOR_FAILURE="echo -en \\033[0;31m"
SETCOLOR_FAILURE="echo -en \\033[1;31m"
# terminal sequence to set color to a 'warning' color (currently: yellow)
# Chip: Use bold sequence
# SETCOLOR_WARNING="echo -en \\033[0;33m"
SETCOLOR_WARNING="echo -en \\033[1;33m"
|
3. - Get bright/bold fonts back in your console
One more step to get your pretty fonts back. This perhaps, is the
most important step. This will afford you the nice, bright colors
in your actual user consoles/terms, just like the goold ole'
days.
What you need to do is, create a file in your
$HOME called
.dir_colors. Note the '
. ' prepending the filename - it is a hidden
config file.
You will need to copy ALL of the text shown in the figure
below, directly and exactly as shown into the new file you have
created:
| $HOME/.dir_colors |
# Configuration file for the color ls utility
# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
# off.
COLOR tty
# Extra command line options for ls go here.
# Basically these ones are:
# -F = show '/' for dirs, '*' for executables, etc.
# -T 0 = don't trust tab spacing when formatting ls output.
OPTIONS -F -T 0
# Below, there should be one TERM entry for each termtype that is colorizable
TERM linux
TERM console
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM cons25
TERM xterm
TERM rxvt
TERM xterm-color
TERM color-xterm
TERM vt100
TERM dtterm
TERM color_xterm
# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
NORMAL 00 # global default, although everything should be something.
FILE 00 # normal file
DIR 01;34 # directory
LINK 01;36 # symbolic link
FIFO 40;33 # pipe
SOCK 01;35 # socket
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 01;05;37;41 # orphaned syminks
MISSING 01;05;37;41 # ... and the files they point to
# This is for files with execute permission:
EXEC 01;32
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')
.cmd 01;32 # executables (bright green)
.exe 01;32
.com 01;32
.btm 01;32
.bat 01;32
.sh 01;32
.csh 01;32
.tar 01;31 # archives or compressed (bright red)
.tgz 01;31
.arj 01;31
.taz 01;31
.lzh 01;31
.zip 01;31
.z 01;31
.Z 01;31
.gz 01;31
.bz2 01;31
.bz 01;31
.tz 01;31
.rpm 01;31
.cpio 01;31
.jpg 01;35 # image formats
.gif 01;35
.bmp 01;35
.xbm 01;35
.xpm 01;35
.png 01;35
.tif 01;35
|
4. - Rid those screwy characters in your term
Go ahead and do a man passwd in your
term. You will find that your fonts may look like the ones in the
figure below:
| 'man passwd' in your term. |
PASSWD(1) User utilities PASSWD(1)
NAME
passwd âˆ' update a user’s authentication tokens(s)
SYNOPSIS
passwd [â€k] [â€l] [â€u [â€f]] [â€d] [â€S] [username]
|
Annoying, isn't it? This is a result of Redhat's new
Unicode support in 8.0. If you want to get "normal"
characters back in your term, simply do an export
LANG=C in your term (must be performed every time
you login!) or update your
.bash_profile with that statement in
it.
[Ed: Note, I had to put this in my .bashrc file to get it to work...]
The resulting fix will yield you "normal" characters
seen in the figure below:
| 'man passwd' in your term. |
PASSWD(1) User utilities PASSWD(1)
NAME
passwd - update a user's authentication tokens(s)
SYNOPSIS
passwd [-k] [-l] [-u [-f]] [-d] [-S] [username]
|
Complete!
Of course, you can customize the files listed above to your
liking. The examples shows best represent the font configuration
from the older Redhat distributions.
I hope this helps you as much as it has helped me. If there
are any questions, errors, etc, please contact me!
October 2002
"Chipster"
Created by swannie on 2003-08-07 22:04:40, modified by swannie on 2004-12-28 10:53:03. Modify Page
|