356.1. kdos-sddm-theme-1.0.0
KDOS login screen for SDDM — the Breeze greeter in the accent, with the KDOS mark
| Version | 1.0.0, release 2 |
| Source tree | src/art/kdos-sddm-theme/ |
| Phase | 50_desktop (Desktop), 54 of 92 in build order |
| Licence | LGPL-2.0-or-later |
| Homepage | https://github.com/kunaldawn/kdos |
| Build time | 0.1 SBU |
| Installed size | 110.9 KiB in 10 files |
| Recipe | src/art/kdos-sddm-theme/kpkgbuild |
About
kdos-sddm-theme is the KDOS login screen, installed as /usr/share/sddm/themes/kdos. It is not written from scratch: the build copies the Breeze SDDM theme that plasma-desktop installs and applies one patch to it, so the login screen and the lock screen are drawn by the same Breeze components and share one layout.
Colours, the Plasma style and the cursor come from the sddm account’s kdeglobals, plasmarc and kcminputrc. These are copied from kdos-plasma-look’s /usr/share/kdos/greeter/<accent>/ for the machine’s accent at three points: by the image’s 050_theme.sh for the default accent, by the installer, and by kdos-powerd whenever kdos theme runs.
The one colour the patch names is the black of a screen with nothing on it. Breeze’s color= line is removed from theme.conf, so the background colour is the scheme’s Window ground: when the Login Screen settings page’s Clear Image writes type=color to theme.conf.user, the greeter shows the accent’s ground rather than a colour no KDOS palette made.
Why it is in KDOS
The comment above it in script/phases/50_desktop/packages.txt:
The login screen's look: plasma-desktop's Breeze greeter, copied at build time with the KDOS accent and mark patched in.
Sources
None: the port builds from its own directory, /kdos/src/art/kdos-sddm-theme.
Dependencies
Depends on: plasma-desktop, plasma5support, kdos-icons, kdos-plasma-look, kdos-theme, python3-pillow, fontconfig.
Required by (1): kde-plasma.
Patches
build.sh applies these; kpkg applies nothing by itself.
kdos-sddm.patch— derive the KDOS greeter from the Breeze SDDM theme: KDOS mark, accent background and ground, monospace clock, credit, KWin layout switcher, screen-reader chord, fade through black, no Hibernate button where none is possible
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/50_desktop/phase.env && kpkg install kdos-sddm-theme'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /kdos/src/art/kdos-sddm-theme.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/kdos-sddm-theme
SRC=$SRC_ROOT/kdos-sddm-theme-1.0.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
cp -a /usr/share/sddm/themes/breeze/. .
patch -p1 -i "$PORT_SRC/kdos-sddm.patch"
rm -f preview.png default-logo.svg Messages.sh KeyboardButton.qml
install -m644 "$PORT_SRC/sddm-theme.desktop" metadata.desktop
python3 "$PORT_SRC/genpreview.py" "/usr/share/kdos/greeter/$(kdos-theme accents --default)" preview.png
install -d "$PKG/usr/share/sddm/themes/kdos"
cp -a . "$PKG/usr/share/sddm/themes/kdos/"
install -Dm644 /usr/share/licenses/plasma-desktop/LICENSES/LGPL-2.0-or-later.txt \
"$PKG/usr/share/licenses/$name/LGPL-2.0-or-later.txt"
The switches, and why each is set:
cp -a /usr/share/sddm/themes/breeze/. .— The installed Breeze theme, from the plasma-desktop in the tree. Deriving from the installed copy is what makes an upstream change to the Breeze greeter a build failure here instead of a broken login screen.rm -f preview.png default-logo.svg Messages.sh KeyboardButton.qml— Breeze’s screenshot, which the login-screen settings page would show as this theme’s; the Plasma logo, which the patchedtheme.confdoes not name; a translation-extraction script that does nothing on an installed system; and Breeze’s layout button, which the patched footer replaces.python3 "$PORT_SRC/genpreview.py"— The theme’spreview.png, drawn for the default accent (kdos-theme accents --default), the picture System Settings → Login Screen shows for it (Screenshot=preview.pngin the metadata).genpreview.pydraws a schematic of the greeter with python3-pillow: the default accent’s greeter background, cropped and blurred as the greeter shows it, the clock and date in the set’s fixed-width face (resolved byfc-match), the user’s circle, the password field and the credit, every colour read from the set’skdeglobals. The time and date are a fixed sample, so the file is the same at every build. The script is beside the recipe and not installed.install -m644 "$PORT_SRC/sddm-theme.desktop" metadata.desktop— The theme’s own name and id,kdos, in place of Breeze’s. It is a whole file rather than a hunk of the patch because the upstream file is mostly translations of the word Breeze, which change every release. Beside the recipe it is not calledmetadata.desktop, which would make the port directory itself look like an installable theme with noMain.qmlto every check that looks for one.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/kdos-sddm-theme, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf kdos-sddm-theme-1.0.0-2.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/kdos-sddm-theme, and runs the triggers its paths call for.
Other files in the port directory, read by build.sh: genpreview.py, sddm-theme.desktop.
Contents
Installed directories: /usr/share/licenses/kdos-sddm-theme, /usr/share/sddm/themes/kdos.
Notes
kdos-sddm.patch makes the Breeze greeter the KDOS one. It is KDOS’s own and not for upstream. It changes six things:
- The mark and background.
theme.confshows the KDOS mark (distributor-logo-kdosfrom kdos-icons) and takes its background from/var/lib/sddm/kdos-background.png, the accent’s dark wallpaper dimmed until the greeter’s text reads on it (see kdos-theme), copied with the rest of the accent’s greeter files. The scheme’s Window ground is drawn under it, so a greeter that finds no such file shows the accent’s ground instead of an empty window. - The clock is set in the fixed-width face: a new
MonoClock.qml, Breeze’s clock with the font family changed and the time’s no-break spaces made plain ones.en_USand other locales put U+202F (a narrow no-break space) before AM or PM; JetBrains Mono has no glyph for it, and the fallback face’s taller line would push the date down. - The footer carries the credit “KDOS 0.2 · Plasma by KDE”, with the running release in place of
0.2(below), and the lock screen’s keyboard-layout button. - Meta+Alt+S starts Orca, the screen reader, as it does in a session. The greeter’s KWin runs without global shortcuts, so the greeter binds the chord itself.
- A fade through black. The screen fades in out of black and back to black on a login, so the display mode set on either side of the greeter falls inside a black frame.
- No Hibernate button where hibernation is impossible. The button is shown only where
sddm.canHibernateholds; Breeze only disables it and draws it dimmed. KDOS turns hibernation off in/etc/elogind/sleep.conf.d/50-kdos.conf, because its swap is zram (compressed RAM), so elogind answersCanHibernatewithnoand the action row shows Sleep, Restart and Shut Down.
The footer names the release in the form kdos version, the boot menu and the splash give: VERSION from /etc/kdos-release (0.2, or 0.2+<BUILD_ID> on any build but a release one), or on a root with no record /etc/os-release’s VERSION_ID, with +BUILD_ID when it has one. QML reads them with XMLHttpRequest, which Qt refuses for a local file unless QML_XHR_ALLOW_FILE_READ=1 is in the environment; /etc/sddm.conf.d/00-kdos.conf puts it in GreeterEnvironment. A file that cannot be read leaves “KDOS · Plasma by KDE”. genpreview.py draws that release-free credit, since the preview stands for the theme and not one image.
The lock screen as the login. On a machine that logs in automatically into a locked session, the stock Breeze lock screen is the first thing shown, and it is drawn from the same org.kde.breeze.components as this greeter: the same user box, the circle and the name at one place on both, over the same accent’s wallpaper (kscreenlockerrc names the accent’s wallpaper package, whose dark image, dimmed toward the scheme’s ground, is the greeter’s background). The two differ where Plasma’s lock screen does: its clock sits higher, only the greeter carries the credit, and the password field sits 13 pixels lower on the lock screen than on the greeter (its top edge at about y 603 on the greeter and y 616 on the lock screen, at 1920 by 1080). The patch never touches the user box’s layout, so the user box stays where it is on both.
The footer’s two keyboard buttons work over the greeter’s session bus. The Virtual Keyboard button is Breeze’s: Keyboards.KWinVirtualKeyboard.forceActivate(), a D-Bus call to the greeter’s KWin, which shows plasma-keyboard (KWin otherwise shows it only after touch or pen input). The layout button is the lock screen’s (Plasma’s loginlockscreen/Footer.qml): a ToolButton over org.kde.plasma.workspace.components’ KeyboardLayoutSwitcher, which reads and switches KWin’s layouts through org.kde.keyboard, shown when locale1 names more than one. It replaces Breeze’s KeyboardButton.qml, whose list comes from SDDM’s own keyboard model, which SDDM’s Wayland keyboard backend leaves empty, so that button never shows on a Wayland greeter. The bus is the one user service turnstile’s ksvc backend starts for the sddm account.
The greeter always shows a dark accent: SDDM reads no light, dark or time-of-day setting, so for the light accent the greeter files are its dark partner’s. Which theme SDDM uses is [Theme] Current= in /etc/sddm.conf.d/00-kdos.conf, not this package. The Breeze theme this copies is installed by plasma-desktop’s INSTALL_SDDM_THEME, on by default; a plasma-desktop built with it off fails this port at its first line.
Meta+Alt+S starts Orca, and the greeter’s session bus brings up the AT-SPI bus and speech-dispatcher with it, but the sddm account runs no PipeWire and ALSA’s default device is PipeWire’s, so Orca says nothing at the greeter. The command is the fixed string orca --replace, run through Plasma5Support’s executable engine, whose KProcess splits a string with no shell syntax into a program and its arguments and starts it with no shell; nothing typed at the greeter reaches it.