Beautify system startup text

Source: Internet
Author: User

This article does not teach you to create a boot screen or hide the startup text, but to beautify the startup text.

 

1. Improve resolution

Compile the file/boot/GRUB/menu. lst in this path

sudo gedit /boot/grub/menu.lst

AddVGA = 1, 792To your default startup parameters ..

For example:

titleUbuntu, kernel 2.6.10-5-k7 Default root(hd0,0)kernel/vmlinuz root=/dev/hde6 ro quiet splash vga=792initrd/initrd.imgsavedefaultboot

 

2. Change the color of "[OK ]"

Note: This method is invalid for 5.10 breezy. For the solution, click here: there.(Ed. 28/12/2005)

Let's make "[OK]" Green at startup

  • Edit/lib/LSB/init-Functions

sudo gedit /lib/lsb/init-functions

  • Find the log_end_msg () function at the bottom of the fileRed = '$ tput setaf 1'Add under CodeGreen = '$ tput setaf 2'

  • ModifyEcho "$ up $ end [OK]"The code isEcho "$ up $ end [$ {green} OK $ {normal}]"

The modified function looks like the following:

log_end_msg () {# If no arguments were passed, return[ -z "$1" ] && return 1# Only do the fancy stuff if we have an appropriate terminal# and if /usr is already mountedTPUT=/usr/bin/tputEXPR=/usr/bin/exprif [ -x $TPUT ] && [ -x $EXPR ] && $TPUT hpa 60 >/dev/null 2>&1; thenCOLS=`$TPUT cols`if [ -n "$COLS" ]; thenCOL=`$EXPR $COLS - 7`elseCOL=73fiUP=`$TPUT cuu1`END=`$TPUT hpa $COL`START=`$TPUT hpa 0`RED=`$TPUT setaf 1`GREEN=`$TPUT setaf 2`NORMAL=`$TPUT op`if [ $1 -eq 0 ]; thenecho "$UP$END[ ${GREEN}ok${NORMAL} ]"elseecho -e "$UP$START $RED*$NORMAL$END[${RED}fail${NORMAL}]"fielseif [ $1 -eq 0 ]; thenecho "   ...done."elseecho "   ...fail!"fifireturn $1}

 

3. Last

Restart, your beautification solution is complete, and the [OK] information becomes green!

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.