Sweets
Installation

Build from Source

Build and install Sweets from a local checkout

Sweets builds with Cargo and stable Rust. The build produces two binaries: sweets, the compositor, and sweets-session, the native login-session launcher.

Sweets is Linux-only, Wayland-only, and pre-release. Test the nested backend first, and keep a second login session or SSH access available before you start the native backend.

Requirements

Rust 1.85 or newer, Cargo, Git, a C compiler, and pkg-config, plus the development files for these libraries:

LibraryUsed for
DRM, GBM, EGLDisplay access and rendering
libinput (1.21 or newer), libudevInput and device discovery
libseatSeat acquisition and VT switching
WaylandServer and nested backend
libxkbcommonKeyboard keymaps
Pango, CairoConfig-error bar text

Arch Linux

sudo pacman -S --needed base-devel git rustup pkgconf libdrm mesa libinput \
  libseat systemd-libs wayland libxkbcommon pango cairo
rustup default stable

Add seatd if the native session will not use systemd-logind.

Fedora

sudo dnf install gcc git rust cargo pkgconf-pkg-config libdrm-devel \
  mesa-libEGL-devel libgbm-devel libinput-devel libseat-devel \
  libudev-devel wayland-devel libxkbcommon-devel pango-devel cairo-devel

Debian and Ubuntu

sudo apt update
sudo apt install build-essential git pkg-config libdrm-dev libegl1-mesa-dev \
  libgbm-dev libinput-dev libseat-dev libudev-dev libwayland-dev \
  libxkbcommon-dev libpango1.0-dev libcairo2-dev

Use rustup if your distribution ships a Rust older than 1.85.

Optional runtime packages

PackageEnables
systemd-logind or seatdNative backend (required)
footThe built-in Super+Return binding
Xwayland 24.1.0 or newerX11 applications
xdg-desktop-portal, xdg-desktop-portal-wlr, xdg-desktop-portal-gtk, PipeWire, WirePlumberScreen sharing

Build

git clone https://github.com/naurissteins/Sweets.git
cd Sweets
cargo build --release --locked --workspace --all-features

The binaries are target/release/sweets and target/release/sweets-session. Verify the build and the default configuration:

./target/release/sweets --version
./target/release/sweets --check-config config/sweets.lua

Test the nested backend

Run Sweets in a window inside your current Wayland session:

install -Dm644 config/sweets.lua target/share/sweets/sweets.lua
SWEETS_BACKEND=nested ./target/release/sweets

Super+Return opens Foot. Super+Shift+Q exits. A user configuration at ~/.config/sweets/sweets.lua is applied over the staged defaults.

For more log output:

RUST_LOG=sweets=debug SWEETS_BACKEND=nested ./target/release/sweets

Install system-wide

sudo install -Dm755 target/release/sweets /usr/local/bin/sweets
sudo install -Dm755 target/release/sweets-session /usr/local/bin/sweets-session
sudo install -Dm644 config/sweets.lua /usr/local/share/sweets/sweets.lua
sudo install -Dm644 packaging/sweets.desktop \
  /usr/share/wayland-sessions/sweets.desktop

The default configuration path follows the binary path. A compositor at /usr/local/bin/sweets reads its defaults from /usr/local/share/sweets/sweets.lua.

systemd user target

Install this only on a system with a systemd user manager:

sudo install -Dm644 packaging/systemd/sweets-session.target \
  /usr/local/lib/systemd/user/sweets-session.target
systemctl --user daemon-reload

Portal preference

Selects the wlr backend for Screenshot and ScreenCast, and the GTK backend for the other portal interfaces:

sudo install -Dm644 packaging/xdg-desktop-portal/sweets-portals.conf \
  /usr/local/share/xdg-desktop-portal/sweets-portals.conf

Start a native session

Log out and select Sweets in your display manager.

Never start the native backend from a terminal inside another graphical session. It takes over the seat and displays.

Session logs

tail -f "${XDG_STATE_HOME:-$HOME/.local/state}/sweets/sweets.log"

The newest ten session logs are kept in the same directory under sessions/. Set SWEETS_SESSION_LOG to an absolute path to use one custom log instead.

Next steps

On this page