From fcd2dd90b7988dc66808234d40f04de53465cebe Mon Sep 17 00:00:00 2001 From: Bugra Aydogar Date: Tue, 12 Aug 2025 17:58:11 +0300 Subject: [PATCH 1/2] Ubuntu Core: Improve splash screen page by adding a step by step guidance --- .../image-creation/add-a-splash-screen.md | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/docs/how-to-guides/image-creation/add-a-splash-screen.md b/docs/how-to-guides/image-creation/add-a-splash-screen.md index 7688431f..1bb4c4a8 100644 --- a/docs/how-to-guides/image-creation/add-a-splash-screen.md +++ b/docs/how-to-guides/image-creation/add-a-splash-screen.md @@ -54,6 +54,23 @@ The most flexible way to change the appearance of the Ubuntu Core splash screen While Plymouth itself supports a variety of different splash plugins, Ubuntu Core’s implementation only supports its [Scripts](https://gitlab.freedesktop.org/plymouth/plymouth/-/tree/main/themes/script?ref_type=heads) plugin. This is the most flexible plugin as it provides its own feature-rich [scripting language](https://www.freedesktop.org/wiki/Software/Plymouth/Scripts/). + +## Step-by-Step Guide to Creating a Custom Plymouth Theme + +For developers new to Plymouth, follow these steps to create and install a custom theme for Ubuntu Core: + +### 1. Understand Plymouth Theme Structure + +A Plymouth theme consists of: + +- A `.plymouth` configuration file (e.g., `vendor.plymouth`) that defines the theme’s metadata and script file. +- A `.script` file (e.g., `vendor.script`) written in Plymouth’s scripting language to control the splash screen’s visuals. +- Optional image or font files for logos, backgrounds, or text. + +**Example Resources**: Explore a large collection of Plymouth themes for inspiration at [adi1090x/plymouth-themes](https://github.com/adi1090x/plymouth-themes). These themes, ported from Android boot animations, include examples like `angular` and `colorful_loop` that demonstrate scripting techniques. + +### 2. Create the Theme Files + A new theme must be placed within a `/splash/plymouth/themes/vendor` directory in the root of the Gadget snap: ``` @@ -62,6 +79,18 @@ $GADGET/splash/plymouth/themes/vendor/ Pathnames specified in a custom Plymouth config file need to use the prefix `/run/mnt/gadget/splash/` rather than `/snap/gadget-snap/current/splash/` as the former is mounted in the _initramfs_ before Plymouth is starts, whereas the latter is not. +``` +[Plymouth Theme] +Name=Vendor Theme +Description=A custom splash screen for Ubuntu Core +ModuleName=script + +[script] +ImageDir=/run/mnt/gadget/splash/plymouth/themes/vendor +ScriptFile=/run/mnt/gadget/splash/plymouth/themes/vendor/vendor.script +``` + + It can also help to lower the kernel console logging verbosity by specifying `loglevel=3` (or lower) on the kernel command line. See [Customise the kernel command line](/reference/kernel-boot-parameters) for further details. A good custom Plymouth theme example for Ubuntu Core is its own default theme: @@ -71,3 +100,8 @@ Note that the configuration file inside the `vendor/` directory must be named `v See [Building a gadget snap](/how-to-guides/image-creation/build-a-gadget-snap) for details on how to create a custom gadget snap. +### Troubleshooting + +- **Theme not displaying**: Verify the `vendor.plymouth` file points to the correct .script file and that all files are in the `/run/mnt/gadget/splash/plymouth/themes/vendor/` path. + + From e48ec6256aabeb5cb7949ba1fbb8dd1471b2dcfc Mon Sep 17 00:00:00 2001 From: Graham Morrison Date: Tue, 16 Sep 2025 16:57:35 +0100 Subject: [PATCH 2/2] Update add-a-splash-screen.md --- docs/how-to-guides/image-creation/add-a-splash-screen.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/how-to-guides/image-creation/add-a-splash-screen.md b/docs/how-to-guides/image-creation/add-a-splash-screen.md index 1bb4c4a8..ebc7d942 100644 --- a/docs/how-to-guides/image-creation/add-a-splash-screen.md +++ b/docs/how-to-guides/image-creation/add-a-splash-screen.md @@ -54,12 +54,11 @@ The most flexible way to change the appearance of the Ubuntu Core splash screen While Plymouth itself supports a variety of different splash plugins, Ubuntu Core’s implementation only supports its [Scripts](https://gitlab.freedesktop.org/plymouth/plymouth/-/tree/main/themes/script?ref_type=heads) plugin. This is the most flexible plugin as it provides its own feature-rich [scripting language](https://www.freedesktop.org/wiki/Software/Plymouth/Scripts/). - -## Step-by-Step Guide to Creating a Custom Plymouth Theme +## Create a custom Plymouth theme For developers new to Plymouth, follow these steps to create and install a custom theme for Ubuntu Core: -### 1. Understand Plymouth Theme Structure +### Theme structure overview A Plymouth theme consists of: @@ -69,7 +68,7 @@ A Plymouth theme consists of: **Example Resources**: Explore a large collection of Plymouth themes for inspiration at [adi1090x/plymouth-themes](https://github.com/adi1090x/plymouth-themes). These themes, ported from Android boot animations, include examples like `angular` and `colorful_loop` that demonstrate scripting techniques. -### 2. Create the Theme Files +### Create the theme files A new theme must be placed within a `/splash/plymouth/themes/vendor` directory in the root of the Gadget snap: