How to increse Plymouth Theme duration?

I put ubuntu-spinner-logo PT on my old Ubuntu 19.04 PC, how can I increse duration of it, PT last untill boot ends,but spinning logo last for aprox. 15s and PC need about 40s to boot up. I found ubuntu-spinner-logo.script in:

usr/share/plymouth/themes/ubuntu-spinner-logo/

but I do not know how to modify it, or am I allowed to modify it due to licence of it. Thank you on your time.


This will do the job:

Firstly, run the following command in the terminal to create and edit a shell script file in your home directory:

nano ~/SweetDreams.sh

Secondly, copy and paste the following code into the editor, replace USERNAME with your username and save it by pressing Ctrl + X then press Y then press Enter :

#!/bin/bash

x=1

while [ $x -le 1 ]

do

        echo "Sleeping" | tee -a  /home/USERNAME/SweetDreams.log

        sleep 40

        echo "Waking" | tee -a  /home/USERNAME/SweetDreams.log

        x=$(( $x + 1 ))

done

Modify the wait time by changing the 40 after sleep. This time is in seconds.

Thirdly, make the shell script file executable by running the following command in the terminal:

chmod +x ~/SweetDreams.sh

Fourthly, create and edit a custom systemd service to run the shell script at boot by running the following command in the terminal:

sudo nano /etc/systemd/system/SweetDreams.service 

Fifthly, copy and paste the following code into the editor, replace USERNAME with your username and save it by pressing Ctrl + X then press Y then press Enter :

[Unit]
Description=Sweet Dreams
Before=gdm.service

[Service]
Type=oneshot
ExecStart=/home/USERNAME/SweetDreams.sh

[Install]
WantedBy=multi-user.target

Sixthly, start the service by running the following command in the terminal:

sudo systemctl start SweetDreams

Seventhly, enable the service by running the following command in the terminal:

sudo systemctl enable SweetDreams

Finally, reboot your system.


If for any reason you want to undo this solution, please run the following commands in the terminal one after the other in the same sequence below:

  1. sudo systemctl stop SweetDreams
  2. sudo systemctl disable SweetDreams
  3. sudo rm /etc/systemd/system/SweetDreams.service
  4. rm ~/SweetDreams.sh
  5. sudo rm ~/SweetDreams.log

Short explaination:

Plymouth is made to wait for system services. The above SweetDreams service will force plymouth to wait for any period of time you choose. Problem solved.


Very nice, I have made a slight modification to the timer function that might be useful to others who come across this post as i did.

Case Use You have a custom plymouth file but your operating system boots too fast to see it.

#!/usr/bin/env bash
count=0
while [[ "$count" -lt 20 ]];
    do
        read -t 1 -n 1 k <&1
            if [[ "$k" -lt 20 ]];
        then
            break
        else
            sleep 1s
        fi
    count=$(( "$count" + 1 ))
done

This gives the added option of stopping early by pressing q or waiting the full time.