8

I've been attempting to change the bootsplash. I've followed the instructions I've found for ubuntu 14.04 thinking they would work since it's based on that distro. I created my own theme which I'll paste the code below. Are there any special instructions since elementary OS is very heavily rebuilt?

dell.plymouth:

[Plymouth Theme]
Name=dell
Description=Dell Bootsplash
ModuleName=script

[script]
ImageDir=/lib/plymouth/themes/dell
ScriptFile=/lib/plymouth/themes/dell/dell.script

dell.script:

wallpaper_image = Image(“wallpaper.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);

1280 width

2
3

In order to use your theme you need to add and set an alternative for the default plymouth theme, and update the initrd image.

sudo update-alternatives --install /lib/plymouth/themes/default.plymouth default.plymouth /lib/plymouth/themes/dell/dell.plymouth 75
sudo update-alternatives --set default.plymouth /lib/plymouth/themes/dell/dell.plymouth
sudo update-initramfs -u

You can also test your theme without rebooting by using plymouthd and plymouth.

sudo apt-get install plymouth-x11
sudo plymouthd
sudo plymouth show-splash

Edit: Here's the slightly modified dell.script that I used for testing:

Window.SetBackgroundTopColor(0.91, 0.92, 0.91);
Window.SetBackgroundBottomColor(0.80, 0.80, 0.80);

screen.width = Window.GetWidth();
screen.height = Window.GetHeight();

dell.image = Image("wallpaper.png");
dell.width = dell.image.GetWidth();
dell.height = dell.image.GetHeight();

if(dell.width < dell.height) {
  dell.ratio = screen.height / dell.height;
  dell.x = Math.Abs(screen.width - (dell.width * dell.ratio)) / 2;
  dell.y = 0;
} else {
  dell.ratio = screen.width / dell.width;
  dell.x = 0;
  dell.y = Math.Abs(screen.height - (dell.height * dell.ratio)) / 2;
}

dell.scaled = dell.image.Scale(dell.width * dell.ratio, dell.height * dell.ratio);
dell.sprite = Sprite(dell.scaled);
dell.sprite.SetX(dell.x);
dell.sprite.SetY(dell.y);
2
  • I've done all that and everything looks as if it went well but when the splash comes up, it's just a black screen. What are the requirements for the wallpaper? Format? Size? Resolution? Bit depth? – Roxy Aug 11 '15 at 19:17
  • I'm not sure about wallpaper requirements. I tested all of this in a VM and it came up fine (although it wasn't scaled properly). You might want to try another theme that is known to work to determine whether its a problem with your theme or a problem with changing the default theme. – Michael Mims Aug 12 '15 at 12:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.