Userland Overview
The userland is organized into distinct categories in theUserland/ 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
AudioServer
Primary Responsibilities:
- Audio mixing and playback
- Sound device management
- Per-application volume control
- Audio format conversion
LoginServer
Primary Responsibilities:
- User authentication
- Session management
- Login screen
- User switching
SystemServer
Primary Responsibilities:
- Service lifecycle management
- Boot process coordination
- Service dependencies
- System initialization
Complete Service List
Core Services
Core Services
- SystemServer: Init system and service manager
- LoginServer: User authentication and sessions
- WindowServer: GUI compositor and window manager
- Taskbar: Desktop taskbar and system tray
Media Services
Media Services
- AudioServer: Audio mixing and playback
- ImageDecoder: Image decoding service (IPC-based)
Network Services
Network Services
- 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
Desktop Services
Desktop Services
- NotificationServer: Desktop notifications
- Clipboard: System clipboard manager
- FileSystemAccessServer: Filesystem access mediation
- FileOperation: File copy/move operations
- ConfigServer: Configuration management
System Services
System Services
- CrashDaemon: Crash report collection
- LaunchServer: Application launcher and file associations
- DeviceMapper: Device management
- KeyboardPreferenceLoader: Keyboard layout loader
- SpiceAgent: QEMU SPICE integration
Other Services
Other Services
- 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
- Productivity
- Internet
- Development
- System
- Utilities
- 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 inUserland/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:Features
Features
- 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
Language Support
Language Support
- 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:
- Features
- Built-in Commands
- Advanced Features
- 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:
pledge() Usage
pledge() Usage
Applications use Common pledge promises:
pledge() to limit their capabilities:stdio: Basic I/Orpath,wpath,cpath: File read/write/createinet: Network accessunix: Unix domain socketsproc: Process controlexec: Execute other programs
unveil() Usage
unveil() Usage
Applications use
unveil() to restrict filesystem access:Process Isolation
Process Isolation
- 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
