You are not logged in.
giving fancy colors to your boot is real easy. you just buy a bucket of paint in a color you like, could be multiple, and splash them onto your boots. you could be wearing them too, but you'd risk getting your socks and pantlegs colored too. it is okay, if you're into that sorta thing.
so, what i really mean is giving colors to the bootup of your machine. you know that boring white-on-black text scrolling by? you can prettify it! here's how.
open up a terminal, and type this:
sudo touch /etc/lsb-base-logging.shnow, edit that file, using sudo, with your favorite editor (mine is Gedit, so here we go):
sudo gedit /etc/lsb-base-logging.shpaste in the following code:
# Colour our init scripts output
# int log_end_message (int exitstatus)
log_end_msg () {
# If no arguments were passed, return
if [ -z "${1:-}" ]; then
return 1
fi
retval=$1
log_end_msg_pre "$@"
# Only do the fancy stuff if we have an appropriate terminal
# and if /usr is already mounted
if log_use_fancy_output; then
RED=`$TPUT setaf 1`
GREEN=`$TPUT setaf 2`
YELLOW=`$TPUT setaf 3`
NORMAL=`$TPUT sgr0`
$TPUT hpa $((`$TPUT cols` - 12))
else
RED=''
GREEN=''
YELLOW=''
NORMAL=''
fi
if [ $1 -eq 0 ]; then
/bin/echo -e " [ ${GREEN}OK${NORMAL} ]"
elif [ $1 -eq 255 ]; then
/bin/echo -e " [${YELLOW}WARNING!${NORMAL}]"
else
/bin/echo -e " [ ${RED}FAILED${NORMAL} ]"
fi
log_end_msg_post "$@"
return $retval
}
log_action_end_msg () {
log_action_end_msg_pre "$@"
if [ -z "${2:-}" ]; then
end=""
else
end=" ($2)"
fi
/bin/echo -n "${end}"
# Only do the fancy stuff if we have an appropriate terminal
# and if /usr is already mounted
if log_use_fancy_output; then
RED=`$TPUT setaf 1`
BLUE=`$TPUT setaf 4`
NORMAL=`$TPUT sgr0`
$TPUT hpa $((`$TPUT cols` - 12))
else
RED=''
BLUE=''
NORMAL=''
fi
if [ $1 -eq 0 ]; then
/bin/echo -e " [ ${BLUE}DONE${NORMAL} ]"
else
/bin/echo -e " [ ${RED}FAILED${NORMAL} ]"
fi
log_action_end_msg_post "$@"
}(i got this code from over here: http://www.earth.li/~noodles/blog/2010/ … utput.html)
save & close.
now, make it executable:
sudo chmod +x /etc/lsb-base-logging.shreboot, and be blown away by fancy colors!
of course, you want to customize the colors. the script uses tput setaf-stuff, which you might not understand. i know i didn't. that's why we have Google.
first of all, check out this list of possibilities:
Black="$(tput setaf 0)"
BlackBG="$(tput setab 0)"
DarkGrey="$(tput bold ; tput setaf 0)"
LightGrey="$(tput setaf 7)"
LightGreyBG="$(tput setab 7)"
White="$(tput bold ; tput setaf 7)"
Red="$(tput setaf 1)"
RedBG="$(tput setab 1)"
LightRed="$(tput bold ; tput setaf 1)"
Green="$(tput setaf 2)"
GreenBG="$(tput setab 2)"
LightGreen="$(tput bold ; tput setaf 2)"
Brown="$(tput setaf 3)"
BrownBG="$(tput setab 3)"
Yellow="$(tput bold ; tput setaf 3)"
Blue="$(tput setaf 4)"
BlueBG="$(tput setab 4)"
LightBlue="$(tput bold ; tput setaf 4)"
Purple="$(tput setaf 5)"
PurpleBG="$(tput setab 5)"
Pink="$(tput bold ; tput setaf 5)"
Cyan="$(tput setaf 6)"
CyanBG="$(tput setab 6)"
LightCyan="$(tput bold ; tput setaf 6)"
NC="$(tput sgr0)" # No Colornow you want to try out what they do, and you do that like so:
echo $(tput bold ; tput setaf 2)bla$(tput sgr 0)(which will give you a green 'bla')
i haven't tried editing the colors inside the script yet. so don't kick my ass if something doesn't work or whatever. also, use all of this at your own responsibility. i don't know if you can mess things up, but this is your boot you're dealing with so i'd be a bit careful (however, i wasn't, just plumped that stuff in and rebooted... no worries).
EDIT: just tried customizing the colors. here's what to do. add a BOLD variable to the script.
note there are 2 functions inside the script:
log_end_msg () {
[..]
log_action_end_msg () {both have their own color-variables declared. so add BOLD to both like so:
BOLD=`$TPUT bold`(i added it before the NORMAL in both functions, because that seemed to make sense to me... however, that doesn't mean anything, really)
ok, then, you want to just add ${BOLD} somewhere. i especially hated the bright blue and bright green, so here's what i made:
log_end_msg () {
[..]
/bin/echo -e " [ ${BOLD}${GREEN}OK${NORMAL} ]"
[..]
log_action_end_msg () {
[..]
/bin/echo -e " [ ${BOLD}${BLUE}DONE${NORMAL} ]"now reboot... et voila! much, much better!
Offline
Man, you are just totally crazy!!! 
Now let us make some shots.
Offline
This is Waldorf+ only?
• Support #! • Waldorf • Debian sid • Xubuntu • siduction • Peppermint • OpenBox • Xfce • LXDE •
Offline
^ No it is not, therefore the how-to but it is default function under Wheezy.
Offline
^ nope, i am still using the February 2011 release. however, i do not know about the kernel version. i'm running 3.2.9-rt14 right now. and this is not really my turf, so hopefully somebody will chime in...
btw, added stuff about customizing the colors to the first post.
@ivanov: thanks man 
Offline


(Don't know why images are so large; last time I used it I got smaller thumbnails)
• Support #! • Waldorf • Debian sid • Xubuntu • siduction • Peppermint • OpenBox • Xfce • LXDE •
Offline
^ nice! thanks Sabrewolfy!
i'm still considering changing the text too. i think it is a bit wide all-in-all. might replace 'WARNING!' with something else, like simply '!' or '!!' or maybe '!!!' although that sounds more like something is pretty wrong. dunno. it is just that that single word is making the whole list of boot-messages wide, so that's why i want to trim it. maybe just make it 'BOO!'. yeah, that's actually a great idea. doing that now.
Offline
here's some different texts/etc:
# 'American' smileys:
OK: :D
DONE: :)
WARNING: :O
FAILED: D:
# Japanese smileys:
OK: (^_^)
DONE: (^_^)
WARNING: (O_O)
FAILED: (+_+)
# rhowaldt's texts:
OK: [ OK ]
DONE: [DONE]
WARNING: [BOO!]
FAILED: [FAIL]so, as you can see, you can get pretty creative here! and still haven't broken my boot! woohoo!
Offline
so, as you can see, you can get pretty creative here! and still haven't broken my boot! woohoo!
OMG! 
Offline
One of the most important howto's ever
Anyway thanks for your work 
Start Distrohopping here! -> Break your own...
VSIDO
LinuxCNC
Frugalware <- It's all just a kernel.
Offline
(O_O) wow, this is the best thing ever on computers.
eee701 user & other lap/desktops
Offline
thanks guys, you're making me feel even more proud than i already am. this is really an accomplishment for me. the results are great, bordering on revolutionary. and it isn't even my own idea! i'm just the (strange) messenger 
Offline
I don't boot my computer often enough to worry about this, LOL.
Offline
^ Which means it will be all the sweeter when you do though!
• Support #! • Waldorf • Debian sid • Xubuntu • siduction • Peppermint • OpenBox • Xfce • LXDE •
Offline
^ indeed! you'll be in for a surprise!
Offline
Hello all, I followed the how-to and when I rebooted I got the colors but it told me that HAL and something else that I can't remember failed. No keyboard or mouse had to hit the power button to reboot into recovery and delete "lsb-base-logging.sh" from command line. Any reason or remedy? For a little info, I don't use a DM. thanks!
Offline
hi barkbombardier. i don't have a clue myself. like i said before, i did this, then crossed me fingers and figured 'who cares' and went for it, and nothing strange happened. sorry!
Offline
barkbombardier, you can check you /var/log/boot and the dmesg for info about what happened during boot.
Start Distrohopping here! -> Break your own...
VSIDO
LinuxCNC
Frugalware <- It's all just a kernel.
Offline
Ok ok now I don't know what I did or did not do the first time,but all is well this time!:rolleyes:
"GNU...you feel like a genius on minute and a idiot the next." And I love every minute of it!:lol:
Thanks guys.
Offline
^ glad it worked out! you went to trouble and fear, and you now have a very fancy boot. it was so worth it! 
Offline
I think I could convert people to Linux with this.
The Japanese smileys that is.
Last edited by orionthehunter (2012-05-26 14:03:42)
一期一会 Let it be good.
My Screenshots - Blog
Offline
=^~..~^=// As long as it is colourful and it blinks, Asians are crazy for it 
Start Distrohopping here! -> Break your own...
VSIDO
LinuxCNC
Frugalware <- It's all just a kernel.
Offline
yeah, you can use whatever icons or smileys you like. all you have to look at for aesthetics is that the square brackets are evenly spaced. also, dunno if you can influence the font used at boot, because i find the font my boot has is not the most beautiful for showing any type of smiley...
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.