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
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.