Splashing out Sebastian Kaulitzki , Fotolia
Total Page:16
File Type:pdf, Size:1020Kb
LINUXUSER Modifying the Bootsplash Individual bootsplash for your own system SplaShing Out Sebastian Kaulitzki , Fotolia , Kaulitzki Sebastian Users interested in customizing even the smallest detail of their machines will probably want to modify the boot screen. We show you how to carry out this task with openSUSE 11, Ubuntu 8.x, and their derivatives. BY ANDREAS BOHLE AND JÖRG LUTHER any recent distributions hide buggy. For another, it makes configura- two packages with data for the the Linux system’s start mes- tion and customization easier. bootsplash: bootsplash contains the Msages behind a colorful image framework and bootsplash-brand- with a progress indicator. The OpenSUSE 11.0 ing-openSUSE has the files with the cur- bootsplash [1] has long become the OpenSUSE still relies on the legacy, ker- rent openSUSE theme (Figure 1). trademark of each distribution – and is a nel-based bootsplash method. After in- On your local filesystem you need the well-known phenomenon in the world of stalling the system, YaST2 takes you to files from the second package in /etc/ Windows. A customized system needs a fair amount of manual attention. Table 1: Bootsplash Commands Thus far, modifying the bootsplash Variable Value Description meant manually modifying the kernel version 2 or 3 Bootsplash version used [2]. For one thing, you needed to enable state 0 or 1 Enable/ disable graphical bootsplash support for the framebuffer device with jpeg Pathname Background for outputting boot messages support for at least 16-bit color. For an- silentjpeg Pathname Graphic for non-output mode other, it also meant installing a patch fgcolor 0 to 8 Text foreground color from the bootsplash homepage, although bgcolor 0 to 8 Text background color the makers of the original bootsplash tx/ty Numeric values Top left corner of a text frame system refer to more state-of-the-art ap- tw/th Numeric values Width/ height of a text frame proaches on their front page. text_x/text_y Numeric values Top left corner of TrueType text Several alternative approaches are text_size Numeric value Size of text in points available to Linux users now: Splashy text_color Hexadecimal value Text color [3], USplash [4], and Red Hat Graphical box See documentation Draws boxes on the background image Boot. Splashy and USplash run in user- overpaintok 0 or 1 Update boxes only, not the whole screen space, which means on a user account. progress_enable 0 or 1 Enable/ disable progress indicator This offers a number of advantages. For percent 0 to 65535 Starting value for calculating the progress in- one thing, it does not affect system sta- dicator bility if the program code turns out to be 84 ISSUE 99 FEBRUARY 2009 Modifying the Bootsplash LINUXUSER the required files the process for modifying and integrat- by scaling the ing them is fairly convoluted [7]. The original image to steps for creating splash screens for the the right size or by USplash system introduced by Ubuntu, cropping the which displays the Ubuntu logotype and image. The Con- a progress indicator when you boot the vert tool from the distribution, turns out to be even more Imagemagick complex. To do this, you need to inte- package does this grate the required image with a shared for you automati- library (.so) and dump it at the right cally; you just place on the system. need to modify Fortunately, an easier approach lets the original users of Debian, Ubuntu, and their deri- graphic. vates define splash screens for Grub and To add anima- USplash via a graphical interface. The tion to your boot tool for this is the StartUp Manager [8], Figure 1: The default background in openSUSE can get fairly boring. screen, create a which can modify a number of other series of PNG-for- startup settings into the bargain. On bootsplash/themes. Check the directory matted images, which you should num- Ubuntu and its derivatives, you need to for the folder openSUSE, which contains ber in the correct sequence. Make sure install the StartUp Manager by loading all the critical files for an animated you pad the start of the file name with the startupmanager package from the bootsplash along with the background zeros to help the filesystem sort files in Universe repository. After loading the for the kernel and startup messages. the right order. Then use convert to add package, the StartUp Manager will be Pressing F2 at boot toggles between the individual files to the animation: available in System | System Manage- normal startup screen and detailed mes- ment in your Gnome menu. sages. convert -delay 20 anim*.png anim.mng The tool has four tabs with various op- The hierarchy in the openSUSE folder tions for the boot environment. The op- does not completely reflect the instruc- The next step is to put the pieces to- tions you need for configuring the Grub tions on the bootsplash homepage. Ac- gether. All the central settings are lo- and USplash settings are located in the cording to the HOWTO, if you want to cated in the config/ directory, and you first two tabs: Boot Options and Appear- define a new theme, you need images/, can edit the files for the individual ance. config/, and animations/ directories for screen sizes, all of which start with the the graphics data and configuration. The word bootsplash- and have a .cfg suffix. Finding Graphics additional bootloader folder stores the Various configuration commands are In the Display tab in Boot Options (Fig- files with the text that openSUSE dis- available, depending on the bootsplash ure 2), you can set the resolution and plays in the boot menu. package version you are using. color depth for displaying the USplash Whether or not you get to see a The current openSUSE uses com- image. Others lets you specify whether bootsplash, and which one if so, is con- mands from version 3. The “Bootsplash the boot menu and bootsplash should figured in the /etc/sysconfig/bootsplash Commands” table gives you an over- be visible and whether system messages file with two variables: SPLASH and view, and more details are available on THEME. The first of these can be set to the web [6] or in the/usr/share/doc/ yes or no to enable or disable the boot bootsplash/README.config file on any screen. The second variable references openSUSE machine with the bootsplash the folder (below /etc/bootsplash/ package installed. themes) with the bootsplash data. Finally, you need to create a new ini- The variety of screen resolutions tial ramdisk. The following command makes working with a generic theme for takes care of this for you: distribution on the Internet difficult. To avoid seeing black borders or just a sec- mkinitrd -s Screen width x U tion of the original image, you will need Screen height a separate background image for each screen size. The easiest way of handling This completes the package deal, and this is to create a copy of the openSUSE after you shut down your machine and directory. restart, you should see the new graphics To modify the background image, use and texts you created. an image manipulation tool like GIMP (see the GIMP article on page FIXME ff.) Ubuntu StartUp Manager Figure 2: The StartUp Manager has a total of or a vector drawing program such as The Grub boot manager supports the use four tabs with numerous options for modify- Inkscape [5]. In this way, you can create of individual splash screens; however, ing the boot process look and sequence. FEBRUARY 2009 ISSUE 99 85 LINUXUSER Modifying the Bootsplash should appear in the bootsplash. The Appearance tab has Boot menu themes and Usplash themes sections in which you can specify the images to use. To do so, you need to populate the lists with candidates from your filesystem by pressing Manage…. Boot menu themes can be practically any graphic in a format that Linux sup- ports (e.g., GIF, JPG, PNG). The StartUp Manager will then attempt to use Im- agemagick to convert the file to a format that Grub can handle. Some fairly strict rules apply to the formats, and the results are not always what you expect. In most cases, some TLC makes sense (see the “Bootsplashes for Grub” box). Images for the USplash theme must be packed in a shared library, as mentioned earlier. For a selection, check out Figure 3: The Gnome and Ubuntu artwork pages have many USplash themes in various Ubuntu-art.org [9] or Gnome-look.org shapes and colors. [10] (Figure 3) – type “usplash” as your search key. Typically, you can then The next time you launch Linux you resolutions and color depths will typi- download tarballs with packed USplash will (hopefully) see a neat, new splash cally give you more attractive results, themes and unpack the library (file suf- screen. The text in the Grub selection you do need to keep to the physical lim- fix .so) in any directory. Then browse menu might be difficult to read depend- its of your graphics adapter and display. and select by pressing Manage Usplash ing on your choice of background image, Themes. but don’t worry. After booting, you can Conclusions launch the StartUp Manager again and Just a couple of manual steps lets you Polishing modify the background, selection bar customize some important system files After setting up everything to your satis- and text colors in the Appearance tab. to suit your own tastes. In addition, you faction, you can save the settings and Also, don’t forget to check Apply colors do not need to be well versed in configu- click Close.