Sweets
Installation

FreeBSD

Build and run Sweets from source on FreeBSD

FreeBSD support is experimental. Sweets has been tested on FreeBSD 15.1 with seatd and a Radeon RX 580. Broader hardware coverage is still needed.

Build

Install Git, the build dependencies and the default terminal:

sudo pkg install git rust pkgconf libdrm mesa-libs mesa-dri libinput seatd \
  libudev-devd wayland libxkbcommon pango cairo foot dejavu dbus

Rust 1.88 or newer and libinput 1.23 or newer are required. Check libinput with pkg-config --atleast-version=1.23 libinput.

Clone Sweets and build both the compositor and session launcher:

git clone -b main https://github.com/naurissteins/Sweets.git
cd Sweets
export RUSTFLAGS="-L native=$(pkg-config --variable=libdir xkbcommon)"
cargo build --release --locked --workspace

The library search path is required on the tested FreeBSD setup. Keep it set when rebuilding. The build produces target/release/sweets and target/release/sweets-session.

For X11 applications, also install XWayland:

sudo pkg install xwayland

Try it in a window

From an existing X11 desktop, stage the default configuration and start Sweets:

mkdir -p target/share/sweets
install -m644 config/sweets.lua target/share/sweets/sweets.lua
SWEETS_BACKEND=nested LIBGL_ALWAYS_SOFTWARE=1 ./target/release/sweets

This nested path uses software rendering. Click inside the window before using its keys. Super+Return opens Foot. Press Super+Shift+Q twice within three seconds to quit.

Install

From the source directory, install under /usr/local:

sudo install -d /usr/local/bin /usr/local/share/sweets/shaders \
  /usr/local/share/man/man1 /usr/local/share/wayland-sessions
sudo install -m755 target/release/sweets target/release/sweets-session /usr/local/bin/
sudo install -m644 config/sweets.lua /usr/local/share/sweets/sweets.lua
sudo install -m644 config/shaders/*.glsl /usr/local/share/sweets/shaders/
sudo install -m644 packaging/man/sweets.1 packaging/man/sweets-session.1 \
  /usr/local/share/man/man1/
sudo install -m644 packaging/sweets.desktop /usr/local/share/wayland-sessions/

Create your user configuration and validate it:

sweets --init-config
sweets --check-config

--init-config refuses to replace an existing user configuration. To enable X11 applications, add this to your user sweets.lua and check it again:

sweets.xwayland({ enabled = true })

See Configuration to change keys and appearance.

Start a native session

Install and load the appropriate GPU driver using the FreeBSD graphics guide. Native mode needs working DRM/KMS graphics.

Give your regular user seat access and enable the session services:

sudo pw groupmod video -m "$(id -un)"
sudo sysrc seatd_enable=YES dbus_enable=YES
sudo service seatd start
sudo service dbus start

Log out, then log in as your regular user on the physical console. The login must provide an XDG_RUNTIME_DIR owned by your user with mode 0700. Start:

LIBSEAT_BACKEND=seatd dbus-run-session -- sweets-session

The session launcher selects the native backend and writes session logs under ${XDG_STATE_HOME:-$HOME/.local/state}/sweets. It does not require systemd. Super+Return opens Foot. Press Super+Shift+Q twice within three seconds to quit and return to the console.

Current limits

  • force_close is unavailable. Normal window closing still works.
  • Executable-based permission rules cannot grant access on FreeBSD. Turning on permission enforcement hides the privileged protocols from every external client.
  • Monitor hotplug, VT switching and suspend/resume have limited hardware coverage. On the tested RX 580, the accelerated Wayland demo, existing XTerm and new-terminal startup recovered after an untraced suspend cycle.
  • Smithay can log a mode-blob cleanup warning during output restoration. This warning did not prevent recovery in the tested ordinary build.
  • An AMDGPU resume timeout observed during an instrumented test remains unresolved. Full desktop session integration still needs qualification.

On this page