KDOS

The books

KDOS is written down in two books, kept in the same repository as its code and updated along with it. Both are free to read here, in full. The copies on this site are the development edition, updated as KDOS changes; every release carries the edition that matches it: the KDOS book on every machine it installs, and KDOS from Scratch as PDF and HTML on its release page.

Two books

  • The KDOS book

    6 parts · 45 chapters · on every KDOS machine

    What KDOS is and why, how to install and use it, how each part works, the programs KDOS adds, how to build and change it, and reference tables. For anyone trying KDOS, running it or changing it.

  • KDOS from Scratch

    17 parts · 452 chapters · an entry for each of the 2,446 packages · HTML and PDF

    The build in the order it happens, in the manner of Linux From Scratch: an entry for every package with the commands that build it, then the kernel, the ISO, and the everyday tasks of looking after a running machine. For anyone who wants to see how a whole Linux system is put together.

New to KDOS? Start with Getting started, The desktop, Applications and Administration. The KDOS book's title page gives reading paths for using, running and building KDOS.

The KDOS book gives the reasons and KDOS from Scratch gives the commands. The KDOS book assumes a working knowledge of Linux; KDOS from Scratch also assumes you can read a shell script, know what make and a compiler do, and have used Docker. Neither assumes anything about KDOS. Where the two meet, KDOS from Scratch links to the KDOS book rather than repeating it.

On every machine

Every KDOS machine carries the KDOS book as HTML under /usr/share/doc/kdos, so it opens with no network. The Start menu's Library category opens it in the browser, and the kdos-doc command opens it at any page from a terminal, or in a text-mode browser on a text console:

kdos-doc
kdos-doc 02-user-guide/theming

KDOS's own commands, the kdos-* programs, kpkg (the package manager), ksvc (the service supervisor) and kinstall (the installer), have manual pages made from the book's text; man 7 kdos points into the book, and kdos help lists the kdos commands. sudo kdos update install kdos-kfs puts KDOS from Scratch on the machine too. The kdos command says where each copy lives.

Where to start

Four paths through the book, depending on why you are here. Each names its chapters in the order that suits that job; the numbers are the chapter numbers in the Contents.

Understanding the whole system

For a newcomer who wants to go from what KDOS is to how every part of it works, read the book front to back. The shortest route that still covers the whole system is:

  1. Ch 1, Why KDOS, and ch 2, How KDOS differs
  2. Ch 3, Principles, and ch 4, Decisions
  3. Ch 7, The desktop, and ch 8, Applications
  4. Ch 12, Architecture overview, then chapters 13 to 19 in order
  5. Ch 20, The programs, and any program chapter that interests you
  6. Ch 30, How KDOS is built
  7. Ch 44, Status, and ch 43, Known gaps

Installing and using KDOS

For someone who wants an image on hardware and a working desktop:

  1. Ch 1, Why KDOS: what the system is and what it deliberately lacks
  2. Ch 5, Getting started: download the ISO, write a medium, boot it
  3. Ch 6, Installation: the installer, page by page
  4. Ch 7, The desktop: the desks, the panel, KRunner, windows and keyboard shortcuts
  5. Ch 8, Applications: the three ways to get software: prebuilt, built on the machine, and boxed
  6. Ch 9, Theming, and ch 11, Accessibility
  7. Ch 43, Known gaps: what does not exist, before you depend on it

Administering a KDOS machine

For the person who looks after an installed machine: services, hardware, updates and diagnosis.

  1. Ch 10, Administration: the tasks, each as a command or a file
  2. Ch 28, The kdos command: status, doctor and the other subcommands
  3. Ch 13, Boot and init: which program owns each step of a boot
  4. Ch 15, Packaging: what kpkg does, the binary host and updates
  5. Ch 16, Packs and boxes: what installing an application does
  6. Ch 17, The security model: what is protected, and what is not
  7. Ch 26, The daemons: the root daemons and what each allows
  8. Ch 40, Configuration, and ch 41, Filesystem and IPC

Building and extending KDOS

For a developer who builds the distribution, adds or changes a port, or writes desktop software:

  1. Ch 3, Principles: the rules every change is judged against
  2. Ch 12, Architecture overview: how the pieces fit together
  3. Ch 30, How KDOS is built: the build as one story
  4. Ch 31, Developing: the first build, and the loops that avoid one
  5. Ch 32, The build system: phases, the chroot, snapshots, build plans
  6. Ch 33, Writing ports, and ch 34, Build troubleshooting
  7. Ch 36, Writing desktop software, and ch 18, The design language
  8. Ch 35, The C libraries: the libk* libraries the daemons and tools share
  9. Ch 37, Testing: what each harness proves, and what it cannot
  10. Ch 42, Repository layout, and ch 38, The ports catalogue

To build KDOS yourself, start with KDOS from Scratch and the KDOS book's How KDOS is built, the whole build told once as a story.

The KDOS book

The KDOS book in six parts and 45 chapters, from its own contents:

Part I — Introduction

  1. Why KDOSwhat KDOS is, the four properties that define it, who should run it, the trade you accept, what is deliberately absent, and what is not built from source
  2. How KDOS differsKDOS compared point by point with other distributions: the C library, the userland, init, the display stack, packages, reproducibility, applications, updates and hardware support
  3. Principlesthe rules that constrain every change, each with the failure it prevents and the price it charges
  4. Decisionsthe choices where an alternative was reasonable (Plasma as the desktop, elogind, SDDM, slot-image updates, a base image with every port prebuilt beside it, packs, musl, the source archive, -march and more), and why the alternative lost

Part II — Using KDOS

  1. Getting startedfrom a download to a running desktop: checking the ISO, trying it in a virtual machine, writing a medium, booting, the live session, installing, and building an image from source
  2. Installationthe installer page by page, the root filesystem, encryption, A/B root slots, unattended installs and every file the installer writes
  3. The desktopthe Plasma desktop as KDOS ships it: the desks, the panel, the Start menu, KRunner, windows and workspaces, keyboard shortcuts, notifications, files, the clipboard, locking, displays, removable media and the privacy lamps
  4. Applicationsinstalling native ports prebuilt or built on the machine, one at a time or as a group, then finding, installing, launching, updating and removing boxed applications, carrying a set to another machine, and managing boxes
  5. Themingthe eight accents and what switching one changes, Konsole, the boot menu and consoles, Phosphor mode, wallpaper, sounds, fonts, and theming native applications and applications inside a box
  6. Administrationservices, users, storage, networking, the firewall, hardware, updates and diagnosis, then each user's backups, mail, passwords and input methods
  7. Accessibilitythe screen reader, braille and speech at a text console, the magnifier, larger text, keyboard aids, the on-screen keyboard, colour and motion, and boxed applications

Part III — Architecture

  1. Architecture overviewthe three rings, power-on to a drawn window, the host and a box, a running process map, the root daemons, the two packaging systems and where state lives
  2. Boot and initLimine, microcode, the initramfs and its splash, A/B slot selection, unlocking an encrypted root, rcS, the display manager and the console
  3. The sessionwhat a login starts: the Plasma session, the user's services and the session bus, audio, portals, capture, the clipboard, input methods and a box's environment
  4. Packagingthe ports tree, its shelves and its phases, where sources come from, kpkg, what a build verifies, reproducible packages, the binary host, deltas and vulnerability tracking
  5. Packs and boxesthe two lanes, the catalogue, the pack format, installing and mounting, composition, the box, grafts and data packs
  6. The security modelsetuid binaries, system accounts, root daemons, the firewall, polkit, containers, signing, untrusted bytes, and what is not protected
  7. The design languageKDOS's identity on Plasma: colour, type, the pieces of the look, one look from power-on to the lock screen, motion, Phosphor mode, the desks, and the text tools' glyph tiers
  8. The window modelKWin as KDOS sets it: focus, placement, window memory, snapping and tiles, auto-tiling, workspaces, the window rules KDOS writes and more than one screen

Part IV — Programs

  1. The programsevery KDOS program and desktop component, what it does, and every name it answers to
  2. KWinthe compositor as KDOS ships it: its defaults, the carried patches, shortcuts, the key card, window memory, tiling, boxes at the compositor, Phosphor mode, idle and lock, and debugging
  3. The Plasma shellthe three desks, the Start menu, the tray and its privacy lamps, the KDOS runner in KRunner, notices, the kded module, the welcome tour, System Monitor's KDOS sensors and the offline library
  4. KDOS settings pagesthe Boxes, Firewall, Health, KDOS Look, System Versions and Backups pages, and the daemon behind KDE's date, time and language pages
  5. Discoverthe KDOS backend for ports, packs and boxes, what keeps Discover offline, system updates through kdos-sysupdated, the update notifier and firmware
  6. kdos-appboxkdos-appbox, kdos-box and xdg-open: the launch path, launcher generation, the open path, box profiles, warmup and storage drivers
  7. The daemonsthe six root daemons, kdos-mdnsd, the per-box Wayland socket, the other services ksvc runs, and how to add a root daemon
  8. kinstallthe installer's reference: keys, pages, install steps, answer files, dry-run dumps, LVM, encryption, the applications step and its design
  9. The kdos commandthe front door to a KDOS machine, every subcommand, and the eleven other names the same binary answers to
  10. kdos-bbthe forked AAlib demo: running it, and what it establishes about frame pacing, synchronized output, timing to music and audio

Part V — Building and developing

  1. How KDOS is builtthe build as one continuous story, from git clone through fetching, the cross toolchain, the phases and the chroot, to a bootable ISO
  2. Developingwhat a development machine needs, the first build, every make target, rebuilding one thing, working without a build, and cutting a release
  3. The build systemthe thirteen phases and their package lists, where kpkg looks for a port, the phase environment, the chroot, syncing fs/, the orphan sweep, the packaging steps, snapshots, build plans and kdosbuild
  4. Writing portsthe recipe format, canonical build shapes, a worked example, adding a port end to end, vendoring, checking for new versions and publishing sources
  5. Build troubleshootingrecurring fetch, build and push failures, indexed by the message you see, each with its cause and fix
  6. The C librariesthe nine libk* libraries, the dependency direction, and the invariants each one keeps
  7. Writing desktop softwareKDOS's Plasma code: settings modules, widgets, the runner, KWin effects and scripts, names, the toolkit rule, conventions, and the Qt test suite
  8. Testingpreflight, the self-test, the Qt suite, fixtures, the QEMU rig and its Plasma harnesses, AT-SPI goldens, checking the sources, the book checks, measuring frame rate, and what is not tested

Part VI — Reference

  1. The ports catalogueevery port KDOS can build, by shelf and by src/ area, with the phase that builds it, the libraries shipped as the application-developer platform, and the ports named in more than one list
  2. Command indexevery command the tree installs, where it lives and which chapter documents it
  3. Configurationevery configuration file and key, with its default and when a change takes effect
  4. Filesystem and IPCKDOS-owned paths, every socket and its verbs, the D-Bus names KDOS serves, files used as an interface, and environment variables
  5. Repository layoutthe source tree directory by directory: the port repositories, the shelves of ports/core and the areas of src/, the script/ directory, the library rule, where upstream sources are, and what git ignores
  6. Known gapswhat KDOS does not do, or has not been shown to do, and what to do instead
  7. Statusthe maturity of each subsystem and the evidence behind each verdict
  8. Glossarythe vocabulary the book uses, defined once, and the words it avoids

KDOS from Scratch

Every part and chapter of the book, from its own contents. From Part V on, the parts that build packages hold one chapter for each shelf, the subject a package is filed under, such as audio or networking; the packages in each are listed in the book itself. The bootstrap packages of Part III, such as musl libc, GCC and kpkg, have a chapter each.

Front matter

Part I. Preparing

  1. The build host and the os-dev container
  2. Sources and the archive
  3. The fs/ overlay
  4. The build tree
  5. kdosbuild

Part II. The cross toolchain

  1. Cross binutils
  2. Cross GCC, pass 1

Part III. The bootstrap

  1. The file system
  2. Linux API headers
  3. musl libc
  4. libstdc++
  5. Ncurses
  6. Xz
  7. Gzip
  8. Tar
  9. Coreutils
  10. Diffutils
  11. Findutils
  12. Gawk
  13. Grep
  14. Patch
  15. Sed
  16. Readline
  17. Bash
  18. Binutils
  19. GCC
  20. Make
  21. kpkg
  22. kinstall
  23. What the bootstrap leaves

Part IV. The chroot and kpkg

  1. Entering the chroot
  2. Anatomy of a kpkg install

Part V. Self-hosting

Chapters 33–38: six package chapters, one for each shelf of packages

Part VI. The build foundation

Chapters 39–59: 21 package chapters, one for each shelf of packages

Part VII. Compilers

Chapters 60–63: four package chapters, one for each shelf of packages

Part VIII. Languages

Chapters 64–76: 13 package chapters, one for each shelf of packages

Part IX. System

Chapters 77–173: 97 package chapters, one for each shelf of packages

Part X. The graphics stack

Chapters 174–226: 53 package chapters, one for each shelf of packages

Part XI. Toolkits

Chapters 227–282: 56 package chapters, one for each shelf of packages

Part XII. Applications

Chapters 283–343: 61 package chapters, one for each shelf of packages

Part XIII. The desktop

Chapters 344–358: 15 package chapters, one for each shelf of packages

Part XIV. The kernel

  1. Configuring the kernel
  2. Building the kernel
  3. Installing the kernel

Chapters 362–363: two package chapters, one for each shelf of packages

Part XV. The image

  1. The binary host
  2. The package store
  3. The image stage
  4. Cleaning up the root
  5. The application launchers
  6. Sweeping orphaned packages
  7. Stamping the build identity
  8. Seeding the theme
  9. The udev hardware database
  10. Creating the homes
  11. The manual index
  12. The font cache
  13. The software catalogue
  14. The image gates
  15. The image ledger
  16. The initramfs
  17. The initramfs init
  18. The pack store and the base pack
  19. The recipe tree and the source offer
  20. The ISO

Part XVI. System administration

  1. Init and runlevels
  2. Services
  3. Writing a service
  4. Timers
  5. Logs
  6. Modules and sysctl
  7. zram and swap
  8. Out of memory
  9. Time and NTP
  10. Locale and console
  11. Users and groups
  12. Boot menu and kernel parameters
  13. The initramfs and the rescue shell
  14. Microcode and firmware
  15. A/B slots and rollback
  16. Live persistence
  17. Filesystems and fstab
  18. Storage and removable media
  19. Encrypted root
  20. LVM and RAID
  21. Disk health
  22. Backups
  23. sudo, PAM and polkit
  24. Login and autologin
  25. Screen lock
  26. Fingerprints, FIDO keys and smart cards
  27. Firewall
  28. SSH server
  29. Signing keys and trust
  30. NetworkManager
  31. DNS
  32. VPN
  33. Mobile broadband
  34. Access point
  35. Wireless regulatory domain
  36. File sharing
  37. Avahi and mDNS
  38. udev and device groups
  39. Bluetooth
  40. Printing and scanning
  41. Audio
  42. Displays and scaling
  43. Graphics drivers
  44. Power management
  45. Laptops
  46. Firmware updates
  47. kpkg
  48. Updating
  49. Local rebuilds and kdos march
  50. Packs
  51. Boxes
  52. Containers
  53. Virtual machines
  54. Session and environment
  55. Shortcuts and window rules
  56. The panel and the launcher
  57. Xwayland and X11 applications
  58. Input methods
  59. Fonts and theming
  60. Accessibility
  61. Portals and screen sharing
  62. Diagnostics
  63. Desktop troubleshooting
  64. Recovering an unbootable system

Part XVII. Appendices

  1. Canonical build shapes
  2. Flag glossary
  3. Build times
  4. Licences
  5. Glossary

As a PDF

The whole book is also one PDF, made from the same sources as the pages online. The copy here is the development edition; every release page attaches the PDF and HTML of the edition that matches that release.