Introduction:
Hi, first of all, hope you all are enjoying Dapper! As far as I know this HOWTO will work on Dapper as well as Edgy. Any other version I am unsure of how they handle logging and whatnot.
If you have any questions or comments, feel free to respond on the forums or email me.
Warning:
This HOWTO is going to instruct you to change files that help your computer start and run in a functional manner. Modifying these files is dangerous to say the least and will require use of "sudo." With that being said, if you are careful to follow the instructions you should end up with no problems and may want to even change some things on your own to further personalize things!
Step 1: Modifying GRUB
This step will remove use of USPLASH without uninstalling it, as well as up your TTY1-6 console resolutions.
Code:
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_bak
sudo gedit /boot/grub/menu.lst
Study the structure of the file reading some of the comments if you are not already familiar with it. What we want to change is the end of our stable primary kernel line. It should look something like this:
Code:
kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/sda2 ro quiet splash
Remove splash from the line:
Code:
kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/sda2 ro quiet
Next, find a sutiable VGA mode from the following link: http://www.8ung.at/spblinux/grub.htm
I will use 795 since I can support 24 bit color at 1280x1024 resolution. Add vga=XXX on to the end of the same line;
Code:
kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/sda2 ro quiet vga=795
Now when you reboot, your computer will boot without the USPLASH logo and will instead be a high resolution console showing you basically the same information we have seen from before.
Step 2: Adding Color to the Boot Process
This will change the look of the output from step 1. It will colorize the messages to make it a little easier on the human eyes.
Code:
sudo cp /etc/lsb-base-logging.sh /etc/lsb-base-logging.sh_bak
Download the attachment lsb-base-logging.sh.tar.bz2 to your home folder.
Code:
sudo tar xvfj lsb-base-logging.sh.tar.bz2
sudo chown root:root lsb-base-logging.sh.tar.bz2
sudo cp lsb-base-logging.sh /etc/lsb-base-logging.sh
I modified this script to make things turn blue and green and yellow and whatnot. You'll notice the colors during boot only if you followed step one. However, the changes are always visible after boot when you start and stop process from /etc/init.d.
If you want to take a stab at modifying it for yourself and changing the colors, go ahead, it's not overly difficult to study and learn the process. To test out your progress save your file and run
Code:
/etc/init.d/xxx stop
Where xxx is a process that you don't utilize. For example, I used pcimcia a lot because my computer doesn't have any pcmcia components.
Step 3: Colorzing the Prompt
This final amenity will colorize everything in front of what you type in the terminal, i.e. the eft@edgy:~$ sorda deals.
This step is very simple. And can be endlessly customized if you so feel.
Code:
cp ~/.bashrc ~/.bashrc_bak
gedit ~/.bashrc
Look for the following:
Code:
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color)
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
;;
*)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
;;
esac
# Comment in the above and uncomment this below for a color prompt
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
and replace it with:
Code:
# set a fancy prompt (non-color, unless we know we "want" color)
#case "$TERM" in
#xterm-color)
# PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
# ;;
#*)
# PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
# ;;
#esac
# Comment in the above and uncomment this below for a color prompt
PS1='${debian_chroot:+($debian_chroot)}\[\033[32m\]\u@\h\[\033[00m\]:\[\033[34m\]\w\[\033[00m\]\$ '
For details on how to customize this, check out this website: http://www-128.ibm.com/developerwork.../l-tip-prompt/
Step 4: Reboot and Enjoy!
Revert to Original Settings:
Code:
sudo cp /boot/grub/menu.lst_bak /boot/grub/menu.lst
sudo cp /etc/lsb-base-logging.sh_bak /etc/lsb-base-logging.sh
cp ~/.bashrc_bak ~/.bashrc
Bookmarks