Skip to main content
CentOS

Branding Your CentOS Boot Splash Screen

By April 26, 2014September 12th, 2022No Comments

We have looked at using different boot splash screens with the Plymouth boot manager that you can find in Fedora, Red Hat and the system we are using: CentOS 6.5. In this tutorial we will look at creating our own simple Plymouth Theme so we can effectively brand our desktops and servers.

We will use a script module within plymouth to load our wallpaper, in this way can keep the code simple and we do not need to compile code ourselves. For this this we need the plymouth script module installed.

yum install plymouth-plugin-script

Once that is installed we can create our theme. First we create the directory with the theme name, in our case for this example we will create a plymouth theme named tup

mkdir /usr/share/plymouth/themes/tup

Within that directory we will add a PNG file, it has to be PNG for the wallpaper.

cp /root/800.png  /usr/share/plymouth/themes/tup

Then create the theme file: in our case /usr/share/plymouth/themes/tup/tup.plymouth

[Plymouth Theme]
Name=Tup
Description=The Urban Penguin
ModuleName=script
[script]
ImageDir=/usr/share/plymouth/themes/tup
ScriptFile=/usr/share/plymouth/themes/tup/tup.script

plymount

With the theme itself ready we can create the script: /usr/share/plymouth/themes/tup/tup.script

wallpaper_image = Image("800.png");
screen_width = Window.GetWidth();
screen_height = Window.GetHeight();
resized_wallpaper_image = wallpaper_image.Scale(screen_width,screen_height);
wallpaper_sprite = Sprite(resized_wallpaper_image);
wallpaper_sprite.SetZ(-100);

Now we are ready to build the new ram disk

plymouth-set-default-theme  -R tup

Reboot should show the splash screen both shutting down and starting up.