Adapt the appearance of the GRUB boot menu, boot screen, and KDE splash screen
Scripting Language
The Script plugin evaluates the instructions in a theme-name.script
in the theme folder. The specially developed scripting language is extensive. So let's have a look at the minimalistic Simple-Image [5] theme, which displays a centered image at boot time and does not use any animation.
In as-delivered condition, the graphic shows an Arch Linux logo. To replace it, edit the img.png
file in the theme folder or replace it with a PNG with a resolution of 1920 x 1080 pixels. You must reinstall the theme after each change to the image. With an absolute minimum of script code, Simple Image is a good basis for experiments.
The content of the simple-image.plymouth
theme configuration file is shown in Listing 1. The configuration provides a name and description and selects the Script plugin. The [script]
configuration block for the plugin specifies the directory for the image to be displayed and the name of the script file. To create a new theme, simply adjust these paths and the file name of the .plymouth
file itself to match the theme name you have chosen.
Listing 1
simple-image.plymouth
[Plymouth Theme] Name=Arch Linux Simple Image Description=This is a plymouth theme which simply displays an image ModuleName=script [script] ImageDir=/usr/share/plymouth/themes/simple-image ScriptFile=/usr/share/plymouth/themes/simple-image/simple-image.script
You can see the simple-image.script
file in Listing 2. It creates an image object and calculates the screen center (lines 1 to 4). In computer graphics and also in Plymouth scripts, a sprite is a moving image object (line 6). Lines 7 and 8 place its coordinates at the computed center of the display. The last line defines RefreshFunction
as the refresh_callback
, which is called at each step of the boot process. Here it simply sets the opacity of the image to 1
and the stacking order to 15
.
Listing 2
simple-image.script
01 image = Image("img.png"); 02 03 pos_x = Window.GetWidth()/2 - image.GetWidth()/2; 04 pos_y = Window.GetHeight()/2 - image.GetHeight()/2; 05 06 sprite = Sprite(image); 07 sprite.SetX(pos_x); 08 sprite.SetY(pos_y); 09 10 fun refresh_callback () { 11 sprite.SetOpacity(1); 12 spr.SetZ(15); 13 } 14 15 Plymouth.SetRefreshFunction (refresh_callback);
You can extend this rudimentary framework by elaborating on the refresh_callback()
function. You could successively increase the Opacity
from
to 1
, fade in more images, or move sprites over the screen with algorithms of arbitrary complexity using SetX()
and SetY()
. The script plugin documentation lists all the available commands.
Yet Another Splash Screen
The display manager starts after the boot splash. For KDE, openSUSE installs SDDM (Figure 6). When starting KDE, you will then see a second splash screen (Figure 7). The background image of the KDE login manager can be easily changed in the desktop environment's settings tool. This is all it takes to adjust the login screen to match the rest of the graphical design, as the login screen controls use a neutral look by default.
The KDE start screen, on the other hand, does not easily fit into a customized look. Newer KDE versions include a download function for themes in the system settings, as in many other places. This is still missing from openSUSE Leap 15.1, but it's not difficult to download and install themes manually from Pling.com [6]. Just unpack the zip archives in the ~~/.local/share/plasma/look-and-feel/
directory; you might need to create look-and-feel/
first.
The start screens are written in QML, an interface description language provided by the Qt GUI framework used by KDE. To even touch on the Qt feature set would go beyond the scope of this article. However, QML startup screens can be "hacked" in a similar way to Plymouth boot screens by changing the graphics in the Theme-Name/contents/splash/images/
folder.
As soon as you hover the mouse pointer over the preview of a Start Screen Design, a play symbol appears that starts the boot animation for testing purposes. This makes it quite easy to see which graphics from the images/
subfolder appear at which position in the start screen.
Conclusions
Adapting the KDE desktop to your own taste is a breeze. The GRUB boot menu, the boot splash animation, and the KDE start screen are a bit trickier. To install themes found on the Internet, all you have to do is choose the right folder to store the themes, and, in the worst case, you may need to know the right YaST module or command.
It is not quite as easy to create your own themes for these three system design elements. The best way to get started is to modify existing themes using the templates available on the Internet. Even with minor adjustments, you can achieve a customized, seamless look for the system.
Infos
- GRUB themes: https://www.pling.com/browse/cat/109/order/latest/
- GRUB theme file documentation: https://www.gnu.org/software/grub/manual/grub/html_node/Theme-file-format.html
- Plymouth themes: https://www.pling.com/browse/cat/108/order/latest/
- Plymouth script plugin: https://www.freedesktop.org/wiki/Software/Plymouth/Scripts/
- Simple-Image theme: https://github.com/barskern/plymouth-theme-simple-image/
- Start screen designs: https://www.pling.com/browse/cat/488/order/latest
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Endless OS 6 has Arrived
After more than a year since the last update, the latest release of Endless OS is now available for general usage.
-
Fedora Asahi 40 Remix Available for Macs with Apple Silicon
If you've been anticipating KDE's Plasma 6 for your Apple Silicon-powered Mac, then you're in luck.
-
Red Hat Adds New Deployment Option for Enterprise Linux Platforms
Red Hat has re-imagined enterprise Linux for an AI future with Image Mode.
-
OSJH and LPI Release 2024 Open Source Pros Job Survey Results
See what open source professionals look for in a new role.
-
Proton 9.0-1 Released to Improve Gaming with Steam
The latest release of Proton 9 adds several improvements and fixes an issue that has been problematic for Linux users.
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.