Skip to the text
KDOS
Menu

The Plasma shell

plasmashell draws everything on a KDOS screen that is not a window: the wallpaper, the panels, the Start menu, the system tray, the notifications and the on-screen displays. Around it run the other session programs this chapter covers: KRunner, kded6 with KDOS’s module, System Monitor’s sensor daemon, and the Welcome Center. All of them are KDE’s. What KDOS adds is the three desks a person chooses between, two tray applets, a KRunner runner, a notifier, a kded module, a System Monitor plugin and page, the library:/ folder, a file-manager action and the welcome tour, each a port under src/desktop/.

This chapter is the reference for those additions: what each one shows, where it reads from, what it runs and where its state is kept. It is written for anyone who wants to know where a part of the KDOS desktop comes from, or who is changing one. Using the desktop is in The desktop, the colours and fonts in Theming, and the session these programs run in, from the login to the logout, in The session.

Three rules hold for every component here. None of them is a second desktop: each is a plugin, package or program of the kind Plasma already loads, in the place Plasma looks for it. None runs a shell: every command is an argument vector, so a box name, a file name or a search reaches the program it is meant for as one argument. And none reaches the network unasked: what a component shows comes from files and programs on the machine.

The desks

A desk is the arrangement of panels on every screen. KDOS ships three, as Plasma layout templates under /usr/share/plasma/layout-templates/ from the kdos-plasma-look port:

Desk Template Panels on each screen
KDOS, the default org.kdos.desk.kdos One opaque bottom panel, not floating: Start (the KDOS mark and the word Start), the virtual desktops, the pinned applications, three meters (processor, memory, network), the system tray, the clock and Show Desktop
Dock org.kdos.desk.dock A top bar with Start (the mark alone), the focused window’s application menu, the tray and the clock; and a floating dock, centred, as long as its contents, that moves out of a window’s way, with the pinned applications and Show Desktop
Tiling org.kdos.desk.tiling One thin top bar: Start (the mark alone), the desktops by name without window outlines, which would cover the names, the window list, the processor and memory as text, the tray and the clock; and automatic tiling turned on

The pinned applications are Konsole, Dolphin, Firefox ESR and Kate. Each desk’s layout script names them itself; a new account’s ~/.config/kdos/favorites, the list of boxes started ahead of time (“warmed”) at login, names the same four as the first words of its lines, so a pinned application that runs in a box opens quickly on a fresh account. testing/lnfcheck.py keeps the two lists in step. Pinning or unpinning in the panel changes no line of favorites, and editing favorites changes no pin.

No desk sets the clock’s font. The Digital Clock applet’s own font fits the panel’s height and the font in force, so the clock grows with the display scale and with a larger font size; a fixed font would be sized against the screen’s pixel density and stay the same size at 200%.

Every desk configures the system tray the same way:

The tray turns on any default-on applet it has not seen before, so the layout script takes both kept-off applets, the camera indicator and Merkuro’s widget, out of the tray’s extraItems and writes it into knownItems, where the tray never turns it on later. A person can still turn any of them on from the tray’s settings. The KDOS desk also adds the input-method panel when the session’s language is one of those KDE adds it for.

How the KDOS desk fits a narrow screen. A Plasma panel neither wraps nor scrolls. It gives every applet its preferred width first, and the room left over to the applets that stretch to fill it. A KDOS Meters strip prefers its width without sparklines (the small history graphs) and stretches to its full width with them, so the task manager’s launchers are whole before any meter draws a sparkline. Short of room the panel gives up the sparklines first, then narrows the task manager’s launchers, while every figure stays whole. Whatever still does not fit is cut off at the screen’s edge, the clock and Show Desktop first.

Widths are measured in grid units, Plasma’s unit of layout, about 18 logical pixels at the default font. Everything on the KDOS desk except the task manager is about 64 grid units wide, the network meter 11 of them, and each task takes about 3, so the four pinned applications bring the desk to about 76.

The layout script reads the screen’s logical width when it lays the panel out, and drops parts of the desk to fit:

Screen width when the desk is laid out What the KDOS desk leaves out
78 grid units or more (about 1,400 logical pixels) Nothing
Under 78 Start’s label and the network meter
Under 64 (about 1,150 logical pixels) The pager (virtual desktops) as well
Under 50 (about 900 logical pixels) Nothing more gives way; the Dock or Tiling desk is the one that fits

A later change of scale, resolution or font size does not lay the panel out again; run kdos desk kdos to lay it out for the new width.

The network meter alone also adjusts while the session runs. The script sets its face’s stepOutBelow to 82 grid units, the desk’s width with six tasks (about 1,480 logical pixels), and the face draws the meter one pixel wide whenever the panel is narrower than that. The face reads the setting again from the applet’s configuration at every resize, a change of display scale included, so a desk laid out in the running session steps the meter out at the next change of panel width. On a screen between 78 and 82 grid units wide the meter is laid out and stays stepped out, so up to six tasks keep their full size.

How a desk is laid out

Every KDOS global theme carries one layout script, contents/layouts/org.kde.plasma.desktop-layout.js, which Plasma runs at a new account’s first login and whenever the Global Theme page is told to apply “Desktop and window layout”. It lays out the desk named by [Desk] Layout in kdosrc (kdos, dock or tiling; anything else is the KDOS desk) and never a fixed one, so applying any accent’s global theme gives back the same panels. If the desk’s template is missing it lays out Plasma’s default panel, so a screen is never left without one. Each desk template records the time it ran in [Desk] LaidOut.

Which desk is wanted is kept in two places: the installer writes the machine’s choice into /etc/xdg/kdosrc, and kdos desk writes the person’s own into ~/.config/kdosrc, which wins.

Changing the desk in a running session. kdos desk kdos|dock|tiling lays a desk out through plasmashell’s own scripting. Laying a desk out removes every panel, so the command first copies the applets file, ~/.config/plasma-org.kde.plasma.desktop-appletsrc, to two places:

The command is described in The kdos command.

Knowing whether a person changed the panels. After laying a desk out, kdos desk asks plasmashell, read-only, for each panel’s location and alignment, the plugins of its applets in order, and the settings every desk writes into them (Start’s icon and label, the task manager’s launchers and each meter’s face), and records a digest of that in [Desk] LaidOutPanels. kdos desk status --json asks again and compares. A panel added, moved or removed, an applet added, removed or reordered, or one of those settings changed counts as changed by hand; the state Plasma saves into the applets file for itself, such as a popup’s size, does not. That is how the welcome tour knows to warn before it lays a desk over a person’s own arrangement.

The digest is taken straight after the template runs, before the applets load and store their settings again, so it may include only values an applet writes back unchanged: the task manager’s launcher list, serialised from its URLs (an applications: URL is kept whether its desktop file exists or not), and the meter’s face id. A key that an applet rewrites in another form would make every untouched desk read as edited.

A desk that the first login laid out has no digest yet; the first status in a session records the panels as they are. The exception is a desk that has already lost its settings: a Start without its icon, a task manager without launchers or a meter without a face is no applet a desk laid out, so that desk is not recorded and reads as edited until a desk is laid out again.

plasma-workspace’s migrate-calendar-plugins upgrade step would cause exactly that loss. Run at a first login, it empties and rewrites the applets file in the same second as the first layout, and a plasmashell that reads the emptied file and saves over it keeps the panels but loses those settings for good. /usr/share/kdos/xdg/kconf_updaterc therefore records the step as done for every account (see How the KDOS chords reach a person).

Desks and tiling. The tiling desk turns KWin’s auto-tiler on and the other two turn it off, so a desk is a whole arrangement and not half of one (see Tiling). The tiling template writes the KWin key itself, which KWin reads at its next start; kdos desk tiling also turns auto-tiling on at once, as kdos tiling on does.

A desk template must be in the panel containment category, because Plasma finds templates only through it, and must carry "NoDisplay": true, or Add Panel would list it. The build refuses a desk missing either.

The Start menu

Start is Plasma’s Kickoff. The desks set its icon to start-here-kdos and, on the KDOS desk, its label to Start, and give it five favourites: the web browser, Konsole, Dolphin, System Settings and Discover. A setup script in every global theme, plasmoidsetupscripts/org.kde.plasma.kickoff.js, gives any Kickoff added later the same mark and label, so one added by hand from Add Widgets does not show KDE’s logo instead.

Boxed applications are in the menu like any other: kdos-appbox writes a launcher for each, app.<id>.desktop, and runs kbuildsycoca6 (see kdos-appbox). The menu’s Library category lists the offline library’s items (below).

The system tray

The tray is Plasma’s, with KDE’s applets for networks, Bluetooth, audio, batteries, removable devices, the clipboard, notifications and updates. KDOS adds two applets and configures one.

Privacy lamps

plasmoid-kdos-privacy, the applet org.kdos.privacy, shows three lamps (microphone, camera and screen), each only while something is capturing it, and names what is: “Firefox in box www”.

Action Does
Click a lamp Mutes every microphone capture, or unmutes them when all already are; stops every camera or screen capture that can be stopped
Middle click, or Show What Is Capturing in its menu Opens the list, with a Mute or Stop button for each capture
Hover A tooltip naming every capture, while the list is closed

While nothing is capturing, the applet is passive and the tray hides it. It is enabled by default in its notification-area category, which puts it in every tray without a layout having to name it. In the tray the popup’s own header carries the title; the list draws a title of its own only when the applet sits on a panel or the desktop.

Where the lamps get their facts. The applet runs kdos privacy --watch --json and keeps it running, starting it again if it exits; it never polls. The watcher prints one line of JSON at once and another each time a capture starts, stops or is muted. It looks at:

Lamp Source
Microphone PipeWire’s audio capture streams
Camera The processes holding a /dev/video* node open, and PipeWire’s camera nodes
Screen KWin’s screencast streams in PipeWire, whether Spectacle or the desktop portal asked for them

Each capturing process is matched to its box by an app-kdos-<box>-<n>.scope in its cgroup path or, where it has none, by the KDOS_BOX=<box> in its environment when it runs in a mount namespace other than the session’s. kdos-appbox sets that variable in every box’s container and podman passes it to every launch, so a store box and a pack box are named alike. The namespace test keeps a host program that merely inherited the variable from a kdos-box enter shell from being counted as the box’s.

What is not a capture. The task manager’s window thumbnails are KWin screencast streams too, read by plasmashell, and they are left out, so hovering a task lights no lamp. A reader counts as the shell only by what the PipeWire server itself records, never by a name a client gives itself: its PipeWire client must carry a pipewire.sec.pid (which the server takes from the socket’s peer credentials) whose running executable is the same file as /usr/bin/plasmashell, in no box. A reader that only calls itself plasmashell, a box’s own plasmashell, and a reader whose process cannot be inspected are all listed as captures. Every other video source with an active link, KWin’s own screencast source among them, is listed whoever reads it.

Acting on a capture. Mute and Stop run kdos privacy mute|unmute|stop <id> for a capture the watcher listed, and offer only what the watcher says can be done.

Limits. A line of a format version the applet does not know is ignored, so a newer watcher leaves the lamps dark rather than wrong. A camera that is captured without PipeWire and without opening a /dev/video* node is not seen.

Getting Started

plasmoid-kdos-checklist is the first-run checklist. It is a tray entry, and also the QML module org.kdos.checklist that the welcome tour’s Getting Started page shows. Its items, and what each item’s button opens:

Item Opens
Set up a backup System Settings’ Backups page
Pair your phone (optional) KDE Connect
Add a language System Settings’ Region & Language page
Create your first box System Settings’ Boxes page
Check firmware Discover’s updates
Confirm disk encryption The security chapter of this book, in the browser

Which items apply to this machine, and whether each is done or dismissed, comes from kdos checklist --json. It leaves out an item whose part of the system is not installed or that cannot be done here, such as disk encryption on the live medium, whose root is no disk. Each item’s words and the program its button opens are kept in the module, keyed by the item’s id, and never taken from the probe’s output, so nothing the probe prints is ever run.

Each row’s mark is a read-only check box named after the item, and it takes the keyboard first in its row, so a screen reader says the item and whether it is done before its buttons, and a done row, which has no buttons, can still be reached. In the tray the popup’s own header carries the applet’s title; the applet draws its own heading only on a panel or the desktop. In its popup the list sits a large spacing in from the frame on every side, and a list taller than the popup scrolls with a scroll bar, and narrows so no row runs under it.

Updates

Discover’s notifier is the tray’s update icon. KDOS’s plugin for it reports a system update, the known vulnerabilities it closes and a slot waiting for a restart; it never applies anything. It is described in Discover.

KRunner and the KDOS runner

KRunner is the search Alt+Space, Meta+Space, Alt+F2 and the Search key open, and the search field of Kickoff and Overview. kdos-runner adds two runners to it. It is KDOS’s own C, linked to basu and SQLite and to nothing from Qt, and it speaks KRunner’s D-Bus runner interface, org.kde.krunner1, under the bus name io.kdos.Runner. Two files in /usr/share/krunner/dbusplugins/ declare it to KRunner, and io.kdos.Runner.service lets the session bus start it at the first query; it exits after ten minutes without a call.

The palette

The runner kdos (object /runner) is the KDOS command palette. It offers:

Type Example Runs
A kdos verb, with its arguments filled in accent amber, accent next, accent prev, phosphor on, tiling off, desk dock, night light, reduced motion, update check, doctor, box stop www, why /etc/fstab kdos … (night light is kdos toggle night-light) or kdos-box …
A search in Discover install gimp offers “Find “gimp” in Discover” plasma-discover --search <words>
A favourite, by its two letters FF the line of ~/.config/kdos/favorites that carries code=FF
A route of /etc/kdos/menu.conf the words of its name, or route:<name> exactly; the row reads Set up network over route:setup.network the route’s program
A pack or .ktar set on the boot medium install gimp offers app.gimp (on medium) Discover with --local-filename, under the medium origin
The library alone lib photosynthesis nothing; KRunner opens again on the words with kdos-library alone (see The library)
The current shortcuts keys <words> nothing; the rows show the chords as KGlobalAccel holds them now
A question for the local model ask what does a box grant? nothing; Enter copies the answer (see Ask)
A KDOS settings page, by its whole title KDOS Look, kdos look; not kdos lo systemsettings kcm_kdos_look

A verb with a value lists its values in their own order, each row a little below the one before it and never into the tier below its own (an exact value, a prefix, a value not typed yet). KRunner shows a runner’s first eight rows, so bare accent shows the next and the previous accent, then the first six accents in the boot menu’s order, Phosphor, Amber, Ice, Bone, Norton and Borland; Perfect and Paper appear once a letter narrows the list (accent p). desk lists the KDOS, Dock and Tiling desks (“Lay the desktop out as the Dock desk”).

On the live medium, where /usr/share/applications/kdos-installer.desktop is installed, install followed by one word that is a prefix of kdos (install kdos, install KD) answers nothing, so the Applications entry Install KDOS is first and Enter starts the installer; such a word offers no Discover search there until it stops being a prefix of kdos. On an installed system install kdos searches Discover like any other words.

The palette ranks first. KRunner sorts its favourite runners’ categories above every other category, whatever a row’s relevance, and /usr/share/kdos/xdg/krunnerrc names kdos first in [Plugins][Favorites] plugins, ahead of KRunner’s own sessions, power, applications and System Settings runners. Two rules follow from that:

How a row runs.

The programs a row may start are kdos, kdos-box, kstart, systemsettings, plasma-discover, konsole, man, zeal and xdg-open. None is a dependency of the runner, and a missing one fails only the rows that need it.

The library

The runner kdos-library (object /library) searches the offline library:

Source Opened by
The headings of this book under /usr/share/doc, and of KDOS from Scratch once sudo kdos update install kdos-kfs has put it there; each subtitled with its chapter and book (Administration · KDOS book; a chapter’s own title reads KDOS book alone) The browser, at the heading’s anchor
The kdos* manual pages man in Konsole
The entries of every Zeal docset Zeal
A typed coordinate, such as 51.5, -0.12 (“Show 51.50000, -0.12000 on the map”) xdg-open on a geo: link, which opens the map program registered for it
Title suggestions from every ZIM archive kiwix-serve serves on 127.0.0.1:8080 The browser
Resources from Kolibri on 127.0.0.1:8081 The browser

Place names are not searched, because neither Organic Maps nor Marble has an offline index another program can query.

The library’s rows rank below everything else, except a typed coordinate, whose one row is placed in a high category. kdos-library is not among krunnerrc’s favourites. For the whole title of a KDOS settings page its rows rank at most 0.42, below the palette’s row for that page.

KRunner shows a row’s subtitle only on the selected row, so titles that would look alike are made distinct in the title itself:

The palette’s lib <words> asks the library alone: its row calls KRunner’s querySingleRunner with kdos-library and the words, so KRunner opens again showing only the library’s rows.

The book index is built in a child process once per install of kdos-doc or kdos-kfs and kept in ~/.cache/kdos/runner-books; until it is written the library answers without the books.

Ask

ask <question> in the palette asks the language model this machine serves. llama-server listens on 127.0.0.1:8082 once a language-model pack has put a .gguf model under /usr/share/llama.cpp/models (see The local servers), and the runner talks to it there and nowhere else: the address is loopback in the runner’s code and only the port can change. It asks /v1/models for the model to name, one already loaded or else the first offered, since the server runs in router mode and refuses a request that names none, and sends the question to /v1/chat/completions with a short instruction to answer in at most three sentences and a cap of 256 tokens.

The question is sent once the typing stops: 600 ms after the last keystroke with no newer question, and a newer question drops the one in flight. The answer is one row at the top, on several lines, with the model’s name under it; Enter or its Copy the answer action puts it on the clipboard through Klipper. A reasoning model’s <think> block is left out. A server that is not listening gives the row “No local model: install a language-model pack”, on as many lines as it needs and with nothing under it, so KRunner never elides the advice; an error gives the server’s own message.

The exchange has 30 seconds. KRunner stops waiting for a runner’s answer after 25, so by 20 the row reads “Still answering” and the exchange runs on; Enter on that row opens KRunner on the same question, and an answer that arrived in the meantime, kept for ten minutes, is shown at once. A timed-out or failed question is asked again the same way.

Timing

KRunner sends a match request on every keystroke, so the runner must answer fast:

A match stays valid for ten seconds after KRunner’s teardown. On Wayland KRunner sends the run request only once KWin has given it an activation token, and the teardown, which it sends without waiting, can arrive first.

The runner ids kdos and kdos-library are an interface: kdos menu and the tests query one runner by id, and renaming either breaks every caller.

Notifications

Plasma draws every notification, keeps their history and honours Do Not Disturb. org.freedesktop.Notifications is plasmashell’s; kdos notify posts through it (see The kdos command).

KDOS’s own notifications carry the hint x-kde-appname=kdos: kdos notify, every caller of libkbase’s kb_notify() (kdos remind, the toggles, kdos verify --notify, kdos speech, kdos-shot, kdos-share), every kdos-notice notice and the runner’s failure notice. It names /usr/share/knotifications6/kdos.notifyrc, which kdos-tools installs, so they show the start-here-kdos mark and a Configure button, are listed as “KDOS Tools” on the Notifications page, and stay in the history. A notification that names no notifyrc and no shown application entry falls under plasma-workspace’s “other applications”, which its /etc/xdg/plasmanotifyrc keeps out of the history.

kdos-notice

kdos-notice tells the person at the session what the system knows and they do not. It is KDOS’s own C, a client of org.freedesktop.Notifications linked to basu, started by /usr/share/kdos/xdg/autostart/kdos-notice.desktop in every Plasma session.

Notice From Stays until dismissed
“Firefox ESR and Konsole were updated”, or “The desktop was updated” with Log Out kdos restarts --json yes
“3 known vulnerabilities in installed packages” kdos cve --json yes
“Running KDOS 0.2.14 on trial” kdos-bootctl status --json no
“Your last update didn’t start” kdos-bootctl status --json no
“firefox-esr in the box www was closed to free memory” status on /run/kdos-oomd.sock no
“Software chosen during install is not installed yet”, with the command that installs it (described after this table) /var/lib/kdos/apps-pending and /var/lib/kdos/groups-pending, which the installer writes, and /ports/groups for the titles yes
“This computer’s hardware needs firmware-nvidia”, with the device in the body and Install kdos firmware sync --dry-run --json yes

The software-still-to-install notice. The installer records two kinds of choice it did not install: boxed applications, which Discover lists under “Selected during install” and installs from there, and native groups of programs, which wait for a binary host (a server of prebuilt packages) to answer. The notice covers both:

The wording is true whether the medium named no binary host and only recorded the groups, or the install tried and the binary host did not answer. Plasma’s popup shows the first eight lines of a body and scrolls the rest. The notice counts each line at 38 characters, the narrow end of the 38 to 41 that the popup’s font holds on a 1920x1080 session, and measures each piece of text by the lines it takes once wrapped, so the body is laid out to keep the command (and, with both kinds waiting, the boxed-application line) above the scroll: when the titles would push them down, as many titles as fit are listed and then “and 3 more”, or only the count if not even one fits. Groups alone always list every title, because this notice is the one place on the desktop that names them. The notice offers Open Discover, and carries Discover’s icon, only when a boxed selection waits; when only groups wait it carries the software-install icon.

When a notice is posted. A notice is posted once per change of what it is about. Each kind reduces its facts to a key, and posts only when the key differs from the last one posted:

Notice Its key
Updated programs The set of processes running replaced code (a process still running a program that was removed, not replaced, is left out)
Vulnerabilities The set of findings
Trial The boot and its slot
Failed update The failed slot
Software still to install The installer’s pending selections and groups
Firmware The firmware ports named

$XDG_STATE_HOME/kdos/notice keeps the keys across logins, so the same vulnerability list is not announced at every login, and a changed one replaces the old notification. A notice whose state ends is withdrawn. A command that does not answer changes nothing. The file is read when kdos-notice starts, so deleting it announces everything once more at the next login.

When it looks. Nothing polls a command:

What the buttons do. Each action is a fixed argument vector:

Notice Button Runs
Vulnerabilities Details Konsole on kdos cve
Trial, failed update Details System Settings at System Versions
Updated programs Show Programs Konsole on kdos restarts
The desktop was updated Log Out Plasma’s logout prompt, over D-Bus
Software still to install Open Discover Discover at “Selected during install”
Firmware Install Konsole on sudo kdos firmware sync, or for an account outside wheel, which sudo refuses, su -c 'kdos firmware sync', which asks for root’s password there

The firmware and software notices’ bodies give such an account the same su -c form. The dry run behind the firmware notice runs as the person logged in, who cannot read the kernel log, so it names only what the devices’ drivers declare; a failed firmware load that only the log records is found by sudo kdos firmware sync --dry-run (see kdos firmware).

A signal that claims to come from the notification server is acted on only when its sender owns org.freedesktop.Notifications at that moment, so another program on the bus cannot press a button.

Run as kdos-notice --bless from /etc/xdg/autostart/kdos-session-good.desktop, the same binary is the session’s half of a confirmed boot: once org.kde.plasmashell has answered on the session bus for a minute with no gap or restart, it calls io.kdos.Slots1.Bless() once and exits. How that confirms a new system version is in Discover.

Sounds

Plasma plays a sound at login and logout only when the event names one, and nothing in Plasma ships those events, so /usr/share/kdos/xdg/plasma_workspace.notifyrc names desktop-login and desktop-logout. They are looked up in the sound theme kdos, which inherits Plasma’s Ocean and then the freedesktop theme. The Notifications page writes a person’s choice to ~/.config/plasma_workspace.notifyrc.

kded-kdos

kded-kdos is a module for kded6, KDE’s session daemon, installed as kf6/kded/kdos.so. It has four jobs.

It keeps the accent in step with Plasma. An accent chosen inside Plasma (a KDOS global theme on the Global Theme page, a KDOS colour scheme on the Colours page, Quick Settings’ light and dark switch) changes only Plasma’s colour scheme. The module watches kdeglobals [General] ColorScheme. When it names a scheme KDOS ships (KDOS<Title> under /usr/share/color-schemes) that differs from the accent in ~/.config/kdos/accent, it runs kdos theme --from-plasma <accent>. That carries the choice to the terminal profiles, the Qt 5 palette, the wallpaper, the lock and login screens, the boot menu and the console. --from-plasma skips applying the global theme, so the run cannot set off another. A scheme that is not KDOS’s changes nothing.

An account’s first login brings only that account into step. The first time the module looks at the scheme in an account with no $XDG_STATE_HOME/kdos/accent-synced marker, it runs kdos theme --from-plasma --account <accent>, and the boot menu, splash and login screen keep the accent chosen for the machine, because a new account’s default scheme is nobody’s choice. The accent file cannot mark a first login, since /etc/skel puts one into every new home, so the module writes the marker at that first look, whatever it finds. Repaint Everything on the KDOS Look page, and any scheme picked after the first look, run the whole switch.

A run that has not finished after a minute is stopped. A run that fails raises one notification per accent and reason in a session, with the last line the command printed.

It offers the application sets on a stick. When a removable volume is mounted, its top directory is listed once for *.ktar files, the sets kdos app export writes. Up to three are offered in one notification whose buttons open each in Discover, which imports it offline and verifies every pack. The module imports nothing itself. Only a regular, non-hidden, non-empty file ending in .ktar in lower case is offered, every name is escaped before it reaches the notification’s text, and the listing stops after 4096 entries.

It starts Samba for a login that can share folders. The Samba server, smbd, must be running before Dolphin’s Share tab can make the first share, because net usershare add asks it to turn the share’s user names into Windows security identifiers. The boot starts smbd once the sambashare group has a member, but an account just added to the group is a member only from its next login. So in a session that can write into /var/lib/samba/usershares, which only a member’s can, the module calls StartFileSharing() on kdos-powerd’s io.kdos.Power1 once when it loads, and that starts Samba if it is not running; see Starting Samba for a shared folder.

It starts plasmashell again when it stops, as How plasmashell is kept running describes.

Its state is on the session bus at org.kde.kded6, object /modules/kdos, interface io.kdos.Kded1: accent(), syncState() (idle, running or failed), lastError() and resync(), with the signals accentSynced and accentSyncFailed. Its four notifications are the events importOffer (“Application set on a removable drive”), syncFailed (“Accent not applied everywhere”), shareStartFailed (“Folder sharing unavailable”) and shellRespawnLimit (“Desktop shell keeps stopping”) in kded_kdos.notifyrc, so the Notifications page lists them under KDOS and each can be silenced there. The KDOS Look page reads it. The module id is the bare word kdos, not a dotted id, because kded registers each module at /modules/<id> and a dot is not allowed in an object path. kdos theme is described in The kdos command.

How plasmashell is kept running

plasma_session starts plasmashell once, from its autostart entry, and the session has no service manager to start it again. KCrash, KDE’s crash handler library, restarts it after a crash signal, but that does not cover the other ways it stops:

kded6 does reconnect to a new compositor and outlives it, so the module watches the name org.kde.plasmashell on the session bus:

  1. When the name has been gone for three seconds (long enough for plasmashell --replace or KCrash’s own restart to take it back), the module asks ksmserver’s isShuttingDown().
  2. If the session is not ending, it starts plasmashell, and looks again twenty seconds later in case the new one exited before taking the name. A logout, and a ksmserver that does not answer, start nothing.
  3. It starts plasmashell at most five times in a minute. Past that it raises one notification, shellRespawnLimit (“Desktop shell keeps stopping”), and leaves the desktop to the person, whose way back is kstart plasmashell, or logging out and in.

A second copy started while one is coming up is harmless: plasmashell is a unique D-Bus service and the later one exits.

The welcome tour

The Welcome Center opens at a new account’s first login. kdos-welcome adds KDOS’s pages to it, QML files in /usr/share/plasma/plasma-welcome/extra-pages/, and intro-customization.desktop, which puts the KDOS mark and the “Plasma by KDE” credit on its first page.

Page Offers
Accessibility Switches for the screen reader, reduced motion, sticky, slow and bounce keys, mouse keys and dwell click; the Fonts page for text size, the two high-contrast accents and the zoom chords; shown straight after the welcome page (and the live page on the live medium), before anything else is asked
Look The accents, light and dark, Phosphor mode, Night Light, reduced motion
Desk The three desks, with undo and the backup’s path
Your System The two system slots and the version each holds; on a one-slot install, that sudo kdos update fetch downloads an update and sudo kdos update apply writes it over the running system, used from the next restart, and there is no previous version; on the live medium, that it has no slots
Keep Your Changes Only on the live medium: keeping the session’s changes in the free space on the stick, or on another USB stick
Software and Boxes Discover, boxes and packs
Offline Library What the library holds, and searching it with the lib palette verb; that the KDOS book is on this machine, and whether KDOS from Scratch is, naming sudo kdos update install kdos-kfs when it is not; the search point names KRunner’s chord by the Keys page’s rule (Meta+Space while it is bound, else the first bound chord with a modifier); launchers for the library applications installed (Kiwix, Help Center, Organic Maps, Zeal, Marble), under an “On this machine” heading shown only when one of them is
Keys The KDOS chords and the key card: for each action the chord KDOS teaches while it is bound, otherwise the first bound chord with a modifier
Privacy and Network The privacy lamps, the firewall and what reaches the network
Help This book and KDOS from Scratch in the browser; the KDOS from Scratch button is greyed, with sudo kdos update install kdos-kfs beside it, while kdos-kfs is not installed, which the page looks at when it loads
Getting Started The checklist
Make It Yours The groups of programs of /ports/groups, from kdos update groups --json: each one installed or not, and what installing it downloads; ticked ones are installed prebuilt, one at a time, with a line saying which and how far; then Discover for everything else. The last KDOS page; Plasma’s own Enjoy It! page follows it and ends the tour. See Make It Yours
What’s New Not part of the tour; described after this table

What’s New. This page tells a person what changed since the version their account last ran. It opens in two ways:

An account’s first login, a fresh install’s included, records the version and opens nothing. A rollback from a new version that never confirmed opens nothing either, since the running version is the one already recorded. The page reads kdos update notes --json and says:

After It says
An update The version the machine came from
A fallback Which version the machine went back to, and that the later one did not start or was not kept
Nothing, on the live medium ("live": true, no slots) Only the running version, with no System Versions button
Nothing, on a fresh install Only the running version, claiming no update

Patches to Welcome Center. The Accessibility page is numbered 00-, and a patch to plasma-welcome shows pages numbered 00- to 09- straight after the welcome page, before Plasma’s own. Other patches:

How a page changes a setting. Every switch on a page runs the command that owns the setting (kdos theme, kdos phosphor, kdos desk, kdos tiling, kdos persist, kwriteconfig6 --notify for KDE keys Plasma watches, dbus-send for the screen reader and KWin’s effects) through one shared runner, kdos/Run.qml. Welcome Center splits a command on spaces, so the runner refuses an argument that is empty or holds a space.

On the live medium /usr/share/kdos/xdg-live/plasma-welcomerc sets LiveEnvironment=true and LiveInstaller=kdos-installer, so the tour opens at every login on its live page, whose big icon starts the installer (kinstall).

Make It Yours

This page offers groups of programs to install ready-made in one step. 95-MakeItYours.qml reads kdos update groups --json when it is made and after every install, and shows one row a group: its title and, under it, “Installed”, or how many packages installing it adds and their download size.

A group is offered only when it is not installed and has a size. The command gives a null size when the release’s signed binhost index (the list of packages the release’s binary host serves) is not in /var/lib/kdos/binhost, or when some package of the group is not prebuilt; a prebuilt install would refuse both. What the page shows then depends on why:

The install button names the number of ticked groups and their total size. Each group is installed by pkexec /usr/libexec/kdos-discover/kdos-ports-helper install <id>, Discover’s prebuilt helper (kdos update install --prebuilt <id>, which installs each member of a group as the port it is; see Install routes and groups), under the polkit action io.kdos.ports.install, whose grant is kept, so one password covers the queue. The groups go one at a time, with “Installing title (n of m)…” and a progress bar; at the end the page lists what went in and, for each group that did not, the helper’s last line. Closing Welcome Center mid-install closes the helper’s standard input, which stops the group being installed (see Discover’s cancel); the groups before it, and that group’s packages already in, stay installed. The rules (which rows are offered, the size, the queue) are kdos/groups.js, tested by tests/tst_groups.qml.in under qmltestrunner. On the live medium the page adds that an install runs from memory and is gone at the next start.

System Monitor

System Monitor and the meters on the KDOS desk read sensors from ksystemstats. ksystemstats-kdos adds a sensor plugin, ksystemstats/ksystemstats_plugin_kdos.so, a sensor face called KDOS Meters, and two System Monitor pages, Overview and KDOS. /usr/share/kdos/xdg/systemmonitorrc opens System Monitor on that Overview, puts the KDOS page second and the stock Applications page third, and hides the stock Overview. The stock page asks for per-disk, per-interface and GPU sensors, which the live medium (its root is a RAM overlay with no block device), a virtual machine and a graphics card ksystemstats cannot read do not have, and a page that names a missing sensor opens under a “missing some sensors” banner. KDOS’s Overview reads the disk and network totals instead and follows gpu/gpu<n>/usage, so it shows each card that reports its use and nothing where none does.

The sensors

The plugin publishes one container, kdos:

Sensors What they read
kdos/box/<box>/{name,icon,cpu,memory,memoryLimit,ioRead,ioWrite,processes,energy} Each running box’s cgroup scope, app-kdos-<box>-<n>.scope, or, for a box with none, its processes: those of the session’s user, in a mount namespace other than the plugin’s, whose environment carries KDOS_BOX=<box>; the name and icon of the launcher whose X-KDOS-Box names the box
kdos/box/all/{boxes,cpu,memory,ioRead,ioWrite,processes} The same, summed over every box
kdos/energy/<app>[@<box>]/{name,app,box,impact,cpuTime,gpu} and kdos/energy/all/… report-json on /run/kdos-energyd.sock, from kdos-energyd
kdos/slot/{status,running,runningVersion,runningState,other,otherVersion,otherState,next,trial,attempts} /run/kdos/bootstate.json, the copy of kdos-bootctl status --json every user may read. With no boot state the machine is the live medium (/ an overlay in /proc/mounts, kdos-bootctl’s test) or one root, and status and running say which (“This is the live medium; it has no A/B slots”, “Live medium”; “This machine boots one system; it has no A/B slots”, “One root”), with runningVersion the VERSION_ID of /etc/os-release
kdos/look/phosphor kwinrc [Plugins] kdos_crtEnabled: 1 while Phosphor mode is on, else 0
kdos/look/phosphorState The same, as the text “On” or “Off”: the one the KDOS page’s System card shows

A box’s figures are its scope’s own cpu.stat, memory.current, memory.max, io.stat and pids.current, which cgroup v2 sums over every descendant, so podman’s container and conmon are inside the totals. Only scopes the session’s own user owns are read.

In practice no box gets a scope on KDOS: elogind leaves /sys/fs/cgroup/<session>/cgroup.procs root’s, cgroup2 then refuses the move into the delegated subtree, and every box runs in the login’s session cgroup. Such a box’s figures are its processes’ sums instead: CPU from each one’s utime, stime and reaped children’s time in /proc/<pid>/stat, memory from its proportional set size (Pss in smaps_rollup), disk from read_bytes and write_bytes in /proc/<pid>/io, and memoryLimit 0, because nothing enforces its profile’s limits, which kdos-box profile says. A process that exits takes its CPU time out of the sum, and that sample shows no CPU or disk rate. See Boxes are measured by their processes, and their limits are unenforced.

kdos-energyd is asked every ten seconds while an energy sensor is watched, and every minute while none is. The energy ledger is root’s and wheel’s alone; for anyone else the status sensor says so and no application sensors exist.

The plugin is built against libksysguard’s sensor interface, which is not stable, so it is rebuilt and tested again at every Plasma minor release.

KDOS Meters and the KDOS page

KDOS Meters is a sensor face: a way of drawing a set of sensors, usable on a System Monitor page, in a desktop widget or in a panel. It draws one row per sensor: the sensor’s name, a sparkline (a small history graph) in the accent, and its figure in the fixed-width font, over a faint scanline background while kdos/look/phosphor reads 1.

In a page or a desktop widget.

Opened from a panel, the face is a popup chart 24 grid units wide, each sparkline four grid units high, with the name and figure at the top of its row. The sparklines share whatever height the popup has, so a popup resized larger (Plasma remembers its size) draws larger lines.

In a horizontal panel the face drops the names and puts a meter’s sensors side by side, one sparkline and figure each, with ↓ and ↑ before a download and upload (or read and write) figure.

Following sensors as they come and go. The face’s sensorPattern setting follows every sensor whose id matches a regular expression, so a box started after the face loaded gets a row. A stock face resolves its sensor list once, when it loads.

The KDOS page has four sections, every card a KDOS Meters face:

Section Shows
Overview This machine, all boxes, the system
Boxes Processor, memory and disk per box
Energy Impact per application, and the ledger
Slots The running system slot and the other one

The meters on the KDOS desk are KDE’s processor, memory and network applets drawn with the KDOS Meters face; the network meter shows download and upload side by side. The desk names each meter’s total sensor (processor usage, used memory, download rate; the Tiling desk’s two meters the same). That sensor is what the applet’s tooltip shows and what a screen reader speaks on the panel button: “Open” followed by the sensor’s name and value. An applet with no total sensor, as the stock network applet has none, speaks “Open” alone.

Acting on a process (ending it, changing its priority) is System Monitor’s own Processes page, whose helper asks polkit for an administrator’s password before it touches another user’s process.

Boxes on the Applications page

The stock Applications page, and the Applications table on the Overview page, group processes by the cgroup scope each application runs in. Upstream they read only /user.slice/user-<uid>.slice/user@<uid>.service, the cgroup of a systemd user manager, which a KDOS login does not have: elogind runs the login in /<session>/session and gives the user /<session>/delegated. libksysguard carries two patches. One roots the page at /<session>, the parent of the cgroup System Monitor itself runs in, whenever a delegated directory sits beside it; the other counts the processes of a scope’s descendant cgroups with the scope’s own, which is where podman puts a box’s container and conmon. With them, a box in an app-kdos-<box>-<n>.scope under delegated would be one row under its launcher’s name and icon. No row results on KDOS: elogind leaves /<session>/cgroup.procs root’s, so kdos-appbox cannot move a box into a scope, and every box, like every program started on the host, runs in the login’s session cgroup, which is no application. The page is empty and every process is on the Processes page. See Host applications and boxes reach the portals unidentified and System Monitor’s Applications page lists nothing.

The library as a folder

kio-library serves library:/, a KIO folder whose five shelves list what is on this machine:

Shelf Holds Found in
Books ZIM archives, this book, and KDOS from Scratch once sudo kdos update install kdos-kfs has installed it /var/lib/kiwix/library.xml, Kiwix Desktop’s library, /usr/share/kiwix, ~/.local/share/kiwix
Maps Organic Maps’ .mwm files /usr/share/organicmaps/data, ~/.local/share/OMaps
Models llama.cpp’s .gguf models, whisper.cpp’s ggml-*.bin, Piper’s voices /usr/share/{llama.cpp,whisper.cpp,piper}/… and the same under ~/.local/share
Docsets Zeal’s .docset directories ~/.local/share/Zeal/Zeal/docsets, /usr/share/zeal/docsets
Courses Kolibri’s channels /var/lib/kolibri/content/databases

Each item shows its size; opening it opens the file with the program the menu would choose. The data pack or package an item came from is the worker’s one extra field, Pack (ExtraNames in its metadata); Dolphin shows a worker’s extra fields only for trash:/, so no Dolphin column carries it. The worker writes nothing. A data pack names its own items with a launcher carrying Categories=X-KDOS-Library;, X-KDOS-Library-Kind=, X-KDOS-Library-Path= and X-KDOS-Pack=; that launcher is also the item’s entry in the menu’s Library category, which /etc/xdg/menus/applications-merged/kdos-library.menu adds. Which package owns an item is read from kpkg’s database once and kept in ~/.cache/kdos/library-owners until the database changes.

kdos-library-place, run once per login from /etc/xdg/autostart, adds Library to the Places panel of Dolphin and every file dialog the first time, and records that in ~/.config/kdos/library-place, so a person who removes the entry has it stay removed.

Transcribe

kdos-transcribe adds Transcribe to the context menu of Dolphin and every KDE file dialog for audio and video files. It runs kdos speech transcribe --notify -- <files>, which writes what is said into a .txt file beside each one with whisper.cpp, offline, and posts a notification when it is done. The entry is a file-item action plugin rather than a service menu, so it can decide each time the menu opens: it appears only while whisper-cli is on the PATH, kdos is installed, every selected item is a local audio or video file, and a speech model is where kdos speech looks for one. Neither whisper.cpp nor a model is on the image: they are the ports whisper.cpp and whisper-model-base-en, installed with sudo kdos update install whisper.cpp whisper-model-base-en, and until both are there the entry does not appear.

Add-ons

KDE’s online “Get New…” store is switched off on every machine by [KDE Action Restrictions][$i] ghns=false in the distribution’s kdeglobals: the settings pages show no Get New button, the wallpaper dialog’s Get New Plugins is greyed, and Add Widgets’ Get New menu holds only Install Widget From Local File. In its place kdos-addons installs a curated set where Plasma already looks: four wallpapers, eight colour schemes with matching Konsole schemes, two KWin scripts (one that keeps a picture-in-picture video above every window, one that opens each new window on the screen under the pointer) and two widgets (a clock in the fixed-width face, and a focus timer). Nothing in it is switched on until a person picks it. Discover lists the set as an add-on of the Plasma shell.

See also


Part IV — Programs, chapter 22. Previous: 21. KWin · Contents · Next: 23. KDOS settings pages