Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 7th February 2008, 05:20 AM
jakarpinsk1 Offline
Registered User
 
Join Date: Apr 2005
Age: 24
Posts: 57
Color Kernel Names and Words

How do i go about changeing or adding color to words and text within the kernel as it boots? The main boot up screen that you see doing all the checking

thanks
__________________
NewAttiPhone.com
"Your World at a Touch"


HP Xe763
733 MHz Celeron / 193 mb RAM
32 MB Nvidia GeForce 2
30 GB Hard Drive / DVD Drive
"Speed Kills"

Macbook
1.83 Ghz Dual Core
2 gb RAM
Parallels Fedora Core 8 Codename SYRUX
:rolleyes:
Reply With Quote
  #2  
Old 7th February 2008, 02:42 PM
Moray Offline
Registered User
 
Join Date: Jan 2008
Posts: 25
[Note: this answer works for CentOS. Fedora should be similar]

You add your own functions to the boot process either in /etc/rc.d/rc.local or as scripts in /etc/rc.d/init.d/ (see man chkconfig to see how the runlevel files are set up). Include /etc/rc.d/init.d/functions in your script and environment variables will be set with commands to set the following colours:

SETCOLOR_SUCCESS # green
SETCOLOR_FAILURE # red
SETCOLOR_WARNING # yellow
SETCOLOR_NORMAL # normal

So you added the following to rc.local:

. /etc/rc.d/init.d/functions
$SETCOLOR_FAILURE
echo "Hello world!"
$SETCOLOR_NORMAL

You will get a red "Hello world!" in your boot sequence. For other colours, you would need to look up the ANSI escape sequences, which you can find on the Web easily enough.
__________________
Moray.
"To err is human; to purr, feline."
Reply With Quote
  #3  
Old 7th February 2008, 03:42 PM
sideways's Avatar
sideways Offline
Retired User
 
Join Date: Oct 2004
Location: London, UK
Posts: 4,999
You can set the colours in /etc/sysconfig/init.

You need to know the escape sequence corresponding to each colour.

http://www.dee.ufcg.edu.br/~rrbrandt/tools/ansi.html
http://pueblo.sourceforge.net/doc/ma...lor_codes.html

Last edited by sideways; 7th February 2008 at 03:46 PM.
Reply With Quote
  #4  
Old 7th February 2008, 06:20 PM
jakarpinsk1 Offline
Registered User
 
Join Date: Apr 2005
Age: 24
Posts: 57
Say I want to make a name that I have added to the boot sequence

Blue

Can you give me an example of what to do?

Thanks
__________________
NewAttiPhone.com
"Your World at a Touch"


HP Xe763
733 MHz Celeron / 193 mb RAM
32 MB Nvidia GeForce 2
30 GB Hard Drive / DVD Drive
"Speed Kills"

Macbook
1.83 Ghz Dual Core
2 gb RAM
Parallels Fedora Core 8 Codename SYRUX
:rolleyes:
Reply With Quote
  #5  
Old 7th February 2008, 11:46 PM
sideways's Avatar
sideways Offline
Retired User
 
Join Date: Oct 2004
Location: London, UK
Posts: 4,999
You put something like this in the init script

Code:
#! /bin/sh

SETCOLOR_BLUE="echo -en \\033[0;34m"

# Source function library.
. /etc/rc.d/init.d/functions

$SETCOLOR_BLUE
echo "I'm blue"
$SETCOLOR_NORMAL
echo "I'm back to normal"
Reply With Quote
Reply

Tags
color, kernel, names, words

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
User names and @ names phree Servers & Networking 4 25th July 2007 09:31 AM
16-bit color vs. 32-bit color depth cnayak Using Fedora 6 11th August 2006 03:07 AM
Search and Replace: Asian words to English Words ieeestd802 Using Fedora 0 28th October 2004 01:45 AM
what means i586 and i686 in kernel names ?? copter Using Fedora 2 2nd July 2004 11:27 AM


Current GMT-time: 09:17 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat