Skip to main content
The SerenityOS userland comprises all user-space components including system services, applications, utilities, and libraries. Everything is built from scratch with a cohesive design philosophy.

Userland Overview

The userland is organized into distinct categories in the Userland/ directory:

System Services

System services are long-running daemon processes that provide core functionality:

WindowServer

Primary Responsibilities:
  • Window management and compositing
  • Input event distribution
  • Desktop rendering
  • Multi-monitor support
  • Theme management
The WindowServer is the compositor that manages all GUI windows, handles mouse/keyboard input, and renders the desktop environment.

AudioServer

Primary Responsibilities:
  • Audio mixing and playback
  • Sound device management
  • Per-application volume control
  • Audio format conversion
Manages all audio output, mixing multiple streams from different applications.

LoginServer

Primary Responsibilities:
  • User authentication
  • Session management
  • Login screen
  • User switching
Handles user login, authentication, and session initialization.

SystemServer

Primary Responsibilities:
  • Service lifecycle management
  • Boot process coordination
  • Service dependencies
  • System initialization
The init system that starts and manages all other system services.

Complete Service List

  • SystemServer: Init system and service manager
  • LoginServer: User authentication and sessions
  • WindowServer: GUI compositor and window manager
  • Taskbar: Desktop taskbar and system tray
  • AudioServer: Audio mixing and playback
  • ImageDecoder: Image decoding service (IPC-based)
  • RequestServer: HTTP/HTTPS request handling
  • WebContent: Isolated web rendering process
  • WebWorker: Web Worker execution
  • WebDriver: Browser automation protocol
  • WebServer: HTTP server daemon
  • LookupServer: DNS resolver
  • DHCPClient: DHCP client
  • NetworkServer: Network configuration
  • TelnetServer: Telnet server
  • NotificationServer: Desktop notifications
  • Clipboard: System clipboard manager
  • FileSystemAccessServer: Filesystem access mediation
  • FileOperation: File copy/move operations
  • ConfigServer: Configuration management
  • CrashDaemon: Crash report collection
  • LaunchServer: Application launcher and file associations
  • DeviceMapper: Device management
  • KeyboardPreferenceLoader: Keyboard layout loader
  • SpiceAgent: QEMU SPICE integration
  • SQLServer: SQL database server
  • ChessEngine: Chess AI engine
  • EchoServer: Echo protocol server (testing)

Applications

SerenityOS includes a rich set of GUI and CLI applications:

GUI Applications

  • TextEditor: Multi-format text editor with syntax highlighting
  • Spreadsheet: Spreadsheet with JavaScript integration
  • Calendar: Calendar and scheduling
  • Mail: Email client
  • FileManager: Graphical file browser
  • PixelPaint: Raster graphics editor

Command-Line Utilities

SerenityOS provides ~200 Unix-like command-line utilities in Userland/Utilities/:

Games and Demos

Games

  • Solitaire
  • Minesweeper
  • Chess
  • 2048
  • Snake
  • Pong
  • Breakout
  • Conway’s Game of Life

Demos

  • CatDog (desktop pet)
  • Eyes (follows cursor)
  • Starfield
  • Fire
  • Mandelbrot
  • WidgetGallery

Applets

  • Audio applet
  • Clock applet
  • Network applet
  • Keyboard applet
  • ResourceGraph

Development Tools

HackStudio IDE

HackStudio is the native IDE for SerenityOS development:
  • C++ syntax highlighting and code completion
  • Project management with multiple build configurations
  • Integrated debugger with breakpoints and variable inspection
  • Git integration (status, diff, commit)
  • Terminal integration
  • TODO list tracking
  • Class browser
  • C++: Full support with LibCpp parsing
  • JavaScript: Syntax highlighting
  • HTML/CSS: Web development support
  • GML: GUI Markup Language
  • Markdown: Documentation editing

Profiler

The Profiler application provides performance analysis:
  • Kernel-level profiling support
  • Per-function timing breakdown
  • Call graph visualization
  • Flame graph generation
  • Symbol resolution
  • Sampling profiler with low overhead

Debugger

Standalone Debugger with:
  • Process attachment and control
  • Breakpoint management
  • Single-stepping execution
  • Memory inspection
  • Register viewing
  • Disassembly view

Shell

The SerenityOS Shell (Userland/Shell/) is a custom shell implementation:
  • POSIX-like shell syntax
  • Job control (background jobs, fg/bg)
  • Pipes and redirections
  • Command history
  • Tab completion
  • Shell scripting
  • Globbing (wildcards)

Dynamic Loader

The DynamicLoader (Userland/DynamicLoader/) is the runtime linker:
  • ELF Loading: Loads dynamically-linked executables
  • Symbol Resolution: Resolves symbols across shared libraries
  • Relocation: Applies relocations for position-independent code
  • Lazy Binding: Defers symbol resolution until first use
  • RPATH Support: Library search path configuration

Application Lifecycle

Typical application execution flow:

Security in Userland

Userland applications benefit from kernel security features:
Applications use pledge() to limit their capabilities:
Common pledge promises:
  • stdio: Basic I/O
  • rpath, wpath, cpath: File read/write/create
  • inet: Network access
  • unix: Unix domain sockets
  • proc: Process control
  • exec: Execute other programs
Applications use unveil() to restrict filesystem access:
  • WebContent Isolation: Browser renders web pages in separate processes
  • ImageDecoder Isolation: Image decoding happens in isolated service
  • Capability-Based Security: Services only granted necessary permissions

Modern C++ Patterns

Userland code extensively uses modern C++ patterns:

Further Reading

Library Architecture

Explore the userland library ecosystem

IPC Architecture

Learn how services communicate

Event Loop System

Understand the event-driven architecture

Coding Patterns

Common coding patterns in SerenityOS