Build from Source
Compile and install Sweets from a local checkout, with the build and runtime dependencies for Arch, Fedora, and Debian/Ubuntu.
Sweets builds with Meson and Ninja against wlroots 0.20. This page covers the dependencies, the build, a quick nested test, and a system install.
Sweets requires wlroots 0.20 specifically — wlroots makes breaking changes
between minor releases. Arch packages it as wlroots0.20. On distributions
that do not yet package 0.20, build and install
wlroots 0.20 from source
first, then build Sweets.
Dependencies
| Dependency | Why it's needed |
|---|---|
meson, ninja, pkg-config, a C compiler | Build system and toolchain (C11) |
wayland-scanner | Generates protocol headers at build time |
wlroots-0.20 | Backend, renderer, scene graph, protocols |
wayland / wayland-protocols | Core Wayland server libraries |
libxkbcommon | Keyboard keymaps |
pixman | Pixel-region math |
libinput | Physical input devices |
lua 5.4 | Configuration (sweets.lua) |
Runtime extras for a complete desktop (optional, but recommended):
| Package | Why it's needed |
|---|---|
xdg-desktop-portal | Portal frontend used by sandboxed and toolkit apps |
xdg-desktop-portal-wlr | Screenshot and screencast backend (wlr-screencopy) |
xdg-desktop-portal-gtk | File-chooser, settings, and other portal fallbacks |
foot | Terminal opened by the default MOD+Return binding |
wireplumber, brightnessctl, playerctl | Targets of the default media-key bindings |
Sweets installs its own portal preferences
(xdg-desktop-portal/sweets-portals.conf), routing screenshot/screencast to
the wlroots backend and everything else to GTK. The portals only need to be
installed — no manual config is required.
Arch Linux
# Build dependencies
sudo pacman -S --needed base-devel meson ninja pkgconf \
wlroots0.20 wayland wayland-protocols libxkbcommon pixman lua54 libinput
# Runtime extras (recommended)
sudo pacman -S --needed xdg-desktop-portal xdg-desktop-portal-wlr \
xdg-desktop-portal-gtk foot wireplumber brightnessctl playerctlMeson resolves Lua through the lua5.4 pkg-config file, which on Arch is
provided by the lua54 package (not lua).
Fedora
# Build dependencies
sudo dnf install gcc meson ninja-build pkgconf-pkg-config wayland-devel \
wayland-protocols-devel wlroots-devel libxkbcommon-devel pixman-devel \
lua-devel libinput-devel
# Runtime extras (recommended)
sudo dnf install xdg-desktop-portal xdg-desktop-portal-wlr \
xdg-desktop-portal-gtk foot wireplumber brightnessctl playerctlDebian / Ubuntu
# Build dependencies
sudo apt install build-essential meson ninja-build pkg-config libwayland-bin \
libwayland-dev wayland-protocols libxkbcommon-dev libpixman-1-dev \
liblua5.4-dev libinput-dev
# Runtime extras (recommended)
sudo apt install xdg-desktop-portal xdg-desktop-portal-wlr \
xdg-desktop-portal-gtk foot wireplumber brightnessctl playerctlCurrent Debian and Ubuntu releases do not ship wlroots 0.20. Build it from
source (it uses the same Meson workflow) and install it before configuring
Sweets, otherwise meson setup will fail to find wlroots-0.20.
Build
Clone the repository:
git clone https://github.com/naurissteins/Sweets.git
cd SweetsConfigure and compile:
meson setup build
ninja -C buildThe compositor lands at build/sweets and the CLI at build/sweetctl.
Confirm it built:
./build/sweets -V # print versionTest it nested
Run the freshly built binary from inside your current Wayland or X session and it opens as a nested window — safe to click into and experiment with:
./build/sweets -d # -d enables debug loggingPress Super + Return for a terminal. See Key Bindings
for the default bindings.
Logs
Every normal Sweets run gets its own private log file:
~/.local/state/sweets/sessions/sweets-<UTC timestamp>-<pid>.log~/.local/state/sweets/sweets.log is a symlink to the current session, so it
stays the convenient path for tail -f.
Sweets keeps the newest ten session logs and caps each at 20 MiB. Past that limit, logging continues on stderr instead of using more disk. Repeated DRM page-flip busy errors are condensed into periodic summaries, so a temporary driver issue does not flood the log.
Use -l <path> to write to one custom log file instead. That mode skips the
session archive, symlink, retention cleanup, and size cap.
Fatal crashes
A normal build writes a short fatal-signal notice to stderr and the session log
for SIGSEGV, SIGABRT, SIGBUS, SIGFPE, or SIGILL. Sweets then restores
the signal's default behavior, preserving its exit status and any core dump.
Sweets deliberately does not build a backtrace inside the signal handler. Unwinding there is not safe when memory, stack, or loader state may already be damaged. Use the core dump with a debugger instead:
ulimit -c unlimited
gdb ./build/sweets core
(gdb) thread apply all bt fullCore-file location and retention depend on your operating system. AddressSanitizer builds leave fatal-signal handling to ASan, so its more detailed report is not replaced by the Sweets notice.
Install system-wide
sudo meson install -C buildThis installs the sweets and sweetctl binaries, the default
sweets.lua, the portal preferences, and the systemd user session target.
To run from a free virtual terminal:
sweetsTo add a Sweets entry to your display manager, install the packaged session launcher and desktop file from the source tree:
sudo install -Dm755 packaging/sweets-session /usr/local/bin/sweets-session
sudo install -Dm644 packaging/sweets.desktop \
/usr/share/wayland-sessions/sweets.desktopThen pick Sweets at the login screen.
Next steps
- Key Bindings — default and custom bindings
- Configuration — the Lua API and defaults