USplashCustomizationHowto
出自Ubuntu中文
How do I customize USplash?
Before starting, make sure you understand the following:
- The PNG must be: 640x480 16 colours. If you are using a different console mode, the image will be centered (both horizontally and verically) and the area around it will be filled with the background colour (image's palette colour #0).
- Some palette entries are used for particular purposes:
| Palette | Reason |
| 0 | Background color |
| 0 | Text background color |
| 1 | Progress bar color |
| 2 | Text foreground color (right) |
| 4 | Progress bar background color |
| 8 | Text foreground color (left) |
| 13 | Failure color |
- The development version of GIMP (CVS or version 2.3.10 or later) has a new plug-in which lets you drag entries in the colormap (palette) to rearrange them. This plug-in is helpful in making these splash images. It is called "Rearrange Colormap" and is available in the image menu at Colors->Map->Rearrange Colormap. You _may_ have to save to a different format other than PNG though and convert back to PNG using a different program as the PNG export plug-in may rearrange the colormap.
After that, the process is simple, just follow these steps:
1. Install BOGL packages needed
sudo apt-get install libbogl-dev
2. Run these steps to get your splash built:
cp yourimage.png usplash-artwork.png pngtobogl usplash-artwork.png > usplash-artwork.c gcc -Os -g -I/usr/include/bogl -fPIC -c usplash-artwork.c -o usplash-artwork.o gcc -shared -Wl,-soname,usplash-artwork.so usplash-artwork.o -o yourimage-splash.so
3. Create a directory for local usplash images (if necessary) and copy your new splash to it:
sudo mkdir -p /usr/local/lib/usplash/ sudo cp yourimage-splash.so /usr/local/lib/usplash/yourimage-splash.so
4. Add your splash to the alternatives system:
sudo update-alternatives --install /usr/lib/usplash/usplash-artwork.so usplash-artwork.so /usr/local/lib/usplash/yourimage-splash.so 55
If this is not the first alternative you have added for usplash-artwork.so, you may also need to select this alternative explicitly. Run:
sudo update-alternatives --config usplash-artwork.so
and select the /usr/local/lib/usplash/yourimage-splash.so file (the file that you have just added to alternatives).
5. Regenerate the initramfs:
sudo dpkg-reconfigure linux-image-$(uname -r)
6. Configure grub: A MUST FOR DAPPERDRAKE
sudo gedit /boot/grub/menu.lst
look for a line that says kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda1 ro quiet splash (line 113 on mine) and add
vga = 785 for standard vga vga = 788 for 800x600 vga = 791 for 1024x768 vga = 794 for 1280x1024
at the end of this line. It should look like this when you are finished kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda1 ro quiet splash vga=791 if you run your screen at 1024x768
That's all. Reboot, and enjoy.
Discussion about USplash errors in Dapper moved to USplashCustomizationHowtoDiscussion. If you experience problems with USplash, please go there.
