You are not logged in.

#1 2005-05-09 07:05:42

leeghoofd
Member
From: the Netherlands
Registered: 2005-04-28
Posts: 61

Problem with init script colors

Hello,

If I start/stop an init script in the console the colors look normal but if I do this in a terminal the colors are white and since my terminal is also white I have to select the text to be able to read it.

This problem occurs both if I have enabled the colors in the terminal or disabled.

I looked at /etc/rc.d/funtions to see what the problem is and commenting all lines under the header colors: solves the problem (but of course the text is than just black)

This is the relevant part in the functions file:

#if [ "$USECOLOR" = "YES" -o "$USECOLOR" = "yes" ]; then

#       C_MAIN="33[1;37m"       # main text
#       C_OTHER="33[1;34m"      # prefix & brackets
#       C_SEPARATOR="33[1;30m"  # separator

#       C_BUSY="33[0;36m"             # busy
#       C_FAIL="33[1;31m"             # failed
#       C_DONE="33[1;37m"             # completed
#       C_BKGD="33[1;35m"             # backgrounded

#       C_H1="33[1;37m"               # highlight text 1
#       C_H2="33[1;36m"               # highlight text 2

#       C_CLEAR="33[1;0m"
#fi

I looked in the man page of echo but I cannot find information about what those colors mean.

Does anyone else also have this problem? And could anyone please explain me what those color codes mean and why they do not show up correcly in a terminal?

If this is a problem that more people have we could maybe try to fix it and submit the new file to the devs

Thanks,
David

Offline

#2 2005-05-09 11:43:10

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: Problem with init script colors

leeghoofd wrote:

I looked in the man page of echo but I cannot find information about what those colors mean.

# ANSI COLORS
NORMAL="33[0;39m"
RED="33[1;31m"
GREEN="33[1;32m"
YELLOW="33[1;33m"
BLUE="33[1;34m"
LCYAN="33[1;36m"
WHITE="33[1;37m"

I use konsole and have the same problem reading success messages when starting and stopping daemons using the /etc/rc.d/<deamon> restart command.  I've learned if I can't see those messages in konsole its a good thing...

Offline

#3 2005-05-10 02:58:18

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: Problem with init script colors

use the -rv command in your terminal to convert light colours to dark

Offline

Board footer

Powered by FluxBB