Skip to content

Instantly share code, notes, and snippets.

@avoidik
Last active October 26, 2022 17:53
Show Gist options
  • Save avoidik/0766432f40e4a6aec242c4956efbc56d to your computer and use it in GitHub Desktop.
Save avoidik/0766432f40e4a6aec242c4956efbc56d to your computer and use it in GitHub Desktop.
Register all available Plymouth themes

Due to a bug or just because of missing feature plymouth themes are not register after installation by dpkg. This way we will register them ad-hoc and in bulk.

Install some themes first

sudo apt-get install plymouth-theme-breeze plymouth-theme-hamara plymouth-themes -y

Register all themes

for themes in /usr/share/plymouth/themes/* ; do
  this=${themes##*/}
  if [ "${this}" == "default.plymouth" ] || [ "${this}" == "debian-theme" ] ; then
    continue
  fi
  sudo update-alternatives \
    --install /usr/share/plymouth/themes/default.plymouth \
      default.plymouth /usr/share/plymouth/themes/${this}/${this}.plymouth \
      100
done
sudo update-alternatives --list default.plymouth

Now change default theme to any

sudo update-alternatives --config default.plymouth # e.g. select hamara

We may also need to change Theme here and set ShowDelay to 5

sudo nano /usr/share/plymouth/plymouthd.defaults

Apply changes to your current initramfs image

sudo update-initramfs -u

In some cases we may have no initramfs at all (for example on Raspbian), so we can create one

sudo update-initramfs -c -k $(uname -r)

On Raspbian we also need to update boot options with these few parameters

sudo mount -o remount,rw /boot
echo "elevator=deadline fixrtc splash quiet plymouth.ignore-serial-consoles logo.nologo loglevel=3 rd.udev.log_priority=3 vt.global_cursor_default=0" | sudo tee -a /boot/cmdline.txt
echo "initramfs initrd.img-$(uname -r) followkernel" | sudo tee -a /boot/config.txt

You can preview plymouth theme

sudo apt install plymouth-x11 -y
mkdir -p ~/.local/bin
git clone -–depth 1 https://github.com/eylles/plymouth-preview
cd plymouth-preview
chmod +x ./install.sh
./install.sh
sudo plymouth-preview 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment