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
-
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.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.