gardm
Display Manager
A system-level display manager with graphical greeter for the gar desktop environment. gardm manages X server lifecycle, user authentication via PAM, session launching, and VT allocation. Features a modern Cairo/Pango-rendered login UI with user list, session selection, power management, and garbg wallpaper integration.
System-Level Component
gardm is a system-level display manager that runs as root and replaces your existing display manager (GDM, SDDM, LightDM). Test in a VM or ensure you have TTY access (Ctrl+Alt+F2) before deployment.
Features
- Two-process architecture (daemon + greeter)
- PAM authentication with state machine
- X11 session support (keeps X server running)
- Wayland session support (direct VT access)
- X server lifecycle management (Xorg spawning)
- VT allocation and switching (ioctl-based)
- User session forking with privilege dropping
- systemd-logind session registration
- Unix socket IPC (JSON protocol)
- Power management (shutdown, reboot, suspend)
- Session discovery from .desktop files
- User enumeration with avatar support
- garbg wallpaper integration with blur
- Accessibility options (high contrast, large text)
- Fade-out transition on login
- systemd service integration (Type=notify)
Architecture
gardmd (Daemon)
Runs as root, manages X server, spawns greeter, handles PAM auth, forks user sessions. IPC server at /run/gardm.sock.
gardm-greeter (UI)
Graphical login interface with Cairo/Pango rendering. User list, session selector, power buttons. Connects to daemon via IPC.
Process Flow
Installation & Setup
Critical Warning
gardm replaces your system display manager. Test in a VM first or ensure you have TTY backup access. If installation fails, you can recover from TTY (Ctrl+Alt+F2).
1. Install gardm
Use the unified installer which handles dependencies, builds, and system integration:
2. Disable Current Display Manager
Disable any existing display manager before enabling gardm:
3. Enable gardm Service
Enable gardm as the system display manager:
4. Configure (Optional)
Create system configuration:
5. Reboot
Reboot to start gardm at boot:
CLI Flags
gardmd accepts several flags for testing and debugging:
| Flag | Description |
|---|---|
| --no-x | Skip X server startup (use existing DISPLAY) |
| -d, --display DISPLAY | X11 display to use (default: :0) |
| --vt N | VT number to use (default: auto-detect) |
| --greeter PATH | Path to greeter binary |
| --test-mode | Test mode (skip VT switching and X server) |
Recovery Procedure
If gardm fails to start, recover from TTY:
sudo systemctl disable gardm sudo systemctl enable gdm (or your previous DM) sudo reboot