You are not logged in.

#1 2009-10-12 03:49:08

hoanglan87
Member
Registered: 2009-01-01
Posts: 8

Why console fonts in archlinux is colorful?

Maybe it's stupid to ask this question. But after downloaded archlinux cd, boot from it, and see very nice color, and my question is how to do that, i've read arch wiki for make console font colorful, but nerver same as boot from archlinux cd.

Offline

#2 2009-10-12 05:26:20

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: Why console fonts in archlinux is colorful?

There should be no difference from a base install and the install CD.
Can you be a little more specific about what is coloured?


neutral

Offline

#3 2009-10-12 05:38:00

warnec
Member
From: Poland
Registered: 2009-06-22
Posts: 166

Re: Why console fonts in archlinux is colorful?

He propably means the messages like

"Loading udev [DONE]" etc...

At the start of the system.

Offline

#4 2009-10-12 06:03:15

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: Why console fonts in archlinux is colorful?

[I gather you're asking how to produce these colours; if not this is likely irrelevant]

The relevant code to produce this is in /etc/rc.d/functions.  Specifically:

if [ "$USECOLOR" = "YES" -o "$USECOLOR" = "yes" ]; then
    C_MAIN="\033[1;37;40m"      # main text
    C_OTHER="\033[1;34;40m"     # prefix & brackets
    C_SEPARATOR="\033[1;30;40m" # separator
        ...
fi

which associates variables with shell escape sequences representing colours.  These are then built into functions for use in output from the init scripts.

These escape sequences are often used in shell prompts, but can be applied to any shell output.  For example:

$ echo -e "\033[1;31mhello \033[1;33mworld\033[1;0m"

For more information, see: http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html

Last edited by chpln (2009-10-12 06:19:09)

Offline

#5 2009-10-12 12:40:20

hoanglan87
Member
Registered: 2009-01-01
Posts: 8

Re: Why console fonts in archlinux is colorful?

Thank you very much, now I know these color from /etc/rc.d/functions. Never touch this file before. I'm going to edit that file.

Last edited by hoanglan87 (2009-10-12 12:41:01)

Offline

Board footer

Powered by FluxBB