Modify the background image and font size of grub boot in Ubuntu 11.10

Source: Internet
Author: User

Enter:

sudo gedit /etc/grub.d/05_debian_theme

After opening the file, find the following content in the file:

if [ -f "/usr/share/desktop-base/grub_background.sh" ]; then   . "/usr/share/desktop-base/grub_background.sh"

Add the following content:

  WALLPAPER="/usr/share/backgrounds/Mount_Snowdon,_Wales_by_Adam_Vellender.jpg"   COLOR_NORMAL="white/black"   COLOR_HIGHLIGHT="brown/black"

After modification, it becomes like this:

if [ -f "/usr/share/desktop-base/grub_background.sh" ]; then. "/usr/share/desktop-base/grub_background.sh"else  # WALLPAPER="/usr/share/backgrounds/Mount_Snowdon,_Wales_by_Adam_Vellender.jpg"   COLOR_NORMAL="white/black"   COLOR_HIGHLIGHT="brown/black"fi

Wallpaper is followed by the path of the background image. Place the image to be set as the background in the corresponding path. jpg, JPEG, PNG, and TGA formats are supported. The resolution has little impact (I can test it myself, if not, you can only change another image)

Color_normal is the color of the unselected menu options, the first color is the text color, and the second is the background color (if the background image has been set, it is better to set the background color to black );
Color_highlight sets the selected color. The first color is the high-brightness text color, and the second is the background color of the selected row. If/Black is the second option, the high brightness will be transparent, and only the text color will change;
See the following color reference:

Modify font size
Find a font file that supports Chinese characters, such as a wqy-microhei.ttc (TTF or TTC can be );
(Font file wqy-microhei.ttc in the following directory/usr/share/fonts/TrueType/wqy)
Run the following command to create a font file:

Code:
grub-mkfont -s 12 -o unicode.pf2 wqy-microhei.ttc

Replace the newly generated Unicode. pf2 file with the Unicode. pf2 file in the/usr/share/GRUB directory;
Remember to back up the original Unicode. pf2 file first, and then restart it to check the effect. If it is not good enough, re-generate Unicode. pf2 in a new font;
Remember to select the font files supported by Chinese characters to generate them. Otherwise, only the box is displayed in Chinese.
The font size is not big enough. Modify the-s 12 parameter. The larger the number, the larger the font size.

Finally, the most important step is to update the grub Configuration:

sudo update-grub

Restart and you will see the desired effect ~~~~

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.