How do i replace splash screen messages?

How do i replace splash screen messages?

I wanted to ask how to change the messages that the splash screen has while asking for the encryption password with a simple text like "insert password". Dunno if it has already been answered this question.

Thanks in advance for the answer.

答案1

This not all that straight forward to do.

The actual text itself comes from somewhere deep in the internals of cryptsetup, and then is rendered by plymouth. It is probably not recommended to go messing with cryptsetup unless you want to brick your machine!!

Probably about the best you could do would be to write a custom plymouth script (or probably more realistically modify an existing one) to override the message that cryptsetup asks plymouth to display and always display the text that you want instead.

Assuming you haven't changed it the default ubuntu plymouth theme is ubuntu-logo defined in this script:

/lib/plymouth/themes/ubuntu-logo/ubuntu-logo.script

You will need to modify the display_password_callback function I think. Take a backup first!!!

Once done you need to run the following to install your custom script:

sudo update-initramfs -u

I strongly suggest you take a look at the links at the bottom of this page to learn about plymouth scripting (and in particular read about how to test your scripts...you don't want to discover you have a serious bug in your script during a real boot)

相关内容