Google


   


You are here: CodeIdol.com > Unix > Ubuntu Hacks > X11 > Change The Ubuntu Splash Screen

SAVE
Digg
Shown on del.icio.us del.icio.us
See Whos Talking About This on Technorati Technorati
I've Reddit reddit

Hack 51. Change the Ubuntu Splash Screen

Want to change what you see while Ubuntu boots up? Learn how to put your own image on that splash screen.

When Ubuntu starts up, it displays a progress bar, the Ubuntu logo, and scrolling messages showing what service is being started. Usplash, the userspace bootsplash system, allows you to customize the background, text, and progress bar of the splash screen.

To customize your splash screen, install GCC and the BOGL framebuffer library development package:

$ sudo apt-get install gcc libbogl-dev
         

Then create a PNG file to use as the splash-screen background. This is trickier than it sounds because there are some very severe restrictions on the format of the image: it must be 640x480 pixels in size and only 16 colors, so forget about using a nice photograph! Some of the colors are used for special purposes, such as to draw the text messages that appear onscreen as services are started, so the usable palette is even more restricted.

The special palette entries are shown in Table 5-1.

Table Special palette entries
Index Use
0 Main and text backgrounds
1 Progress bar color
2 "OK" text color
4 Progress bar background color
8 Description text color
13 "Failed" text color


Make a directory to work in, copy your PNG in, and rename it to something like usplash-mine.png:

$ mkdir usplash
$ cp myimage.png usplash/usplash-mine.png
         

Enter the working directory and convert the PNG to a hexadecimal source file, then "compile" it into a shared object file:

$ pngtobogl usplash-mine.png > usplash-mine.c
$ gcc -Os -g -I/usr/include/bogl -fPIC -c usplash-mine.c -o usplash-mine.o
$ gcc -shared -Wl,-soname,usplash-mine.so usplash-mine.o -o usplash-mine.so
         

In this case, the resulting object file is called usplash-mine.so, but you can give it a different name, as long as you don't call it usplash-artwork.so. That name is used by the system to find the current bootsplash artwork, so the safest thing to do is give all the object files unique names and reference the current file with a symlink:

$ sudo cp usplash-mine.so /usr/lib/usplash/usplash-mine.so
$ sudo ln -sf /usr/lib/usplash/usplash-mine.so \\
              /usr/lib/usplash/usplash-artwork.so
         

To give the kernel access to the splash image early in the boot process, it needs to be stored in the initramfs (initial RAM filesystem). The initramfs is built when the kernel package is installed, so force the currently installed kernel package to be reconfigured:

$ sudo dpkg-reconfigure linux-image-\Quname -r\Q 
         

Once they have been created and installed in /usr/lib/usplash, you can switch between various splash screens, including the original Ubuntu splash, simply by updating the symlink and regenerating the initramfs. For example, to return to the original splash screen:

$ sudo ln -sf /usr/lib/usplash/usplash-default.so \\
              /usr/lib/usplash/usplash-artwork.so
$ sudo dpkg-reconfigure linux-image-\Quname -r\Q 
            
            
         


SAVE
Digg
Shown on del.icio.us del.icio.us
See Whos Talking About This on Technorati Technorati
I've Reddit reddit

You are here: CodeIdol.com > Unix > Ubuntu Hacks > X11 > Change The Ubuntu Splash Screen


   
Related tags







Popular Categories
Unix books and guides

AJAX popular information
C# language guides
Windows books and cookbooks
Wicked On Broadway
.......








    С 2009 года мы стали переводить структура сайта на различные языки. Сайт теперь будет содержать книги не только на английском языке, но также и на других европейских языках, в том числе и на Русском языке.

    Русский Polski Francais Deutsch
    support sitemap terms

© CodeIdol Labs, 2007 - 2009