Skip to content

Install guide

Using package managers

If you are using Nix(OS) with Nix Flakes enabled, refer to the Nix page, and the example Nix flakes setup

Manual install

First, get the latest Rust available through your preferred means.

Minimum supported rust version

The MSRV of fht-compositor is mostly tied to Smithay's MSRV.
As of writing this it's currently 1.85.1

You will need the following system dependencies. Depending on your distribution, you might want to install the -dev or -devel or -headers variant to get developement headers that are required to build.

  • libwayland and dependencies
  • libxkbcommon and dependencies
  • mesa with the appropriate OpenGL driver for you GPU.
  • In order to run the compositor from a TTY: libudev, libinput, libgbm, libseat, libdrm and lib-displayinfo
  • To use XDG screencast portal: pipewire, dbus

Then you can proceed with compiling.

sh
# Clone and build.
git clone https://github.com/nferhat/fht-compositor/ && cd fht-compositor

# If you are not under systemd
cargo build --profile opt
# Integrate with systemd for user session
cargo build --profile opt --features systemd
# You can copy it to /usr/local/bin or ~/.local/bin, make sure its in $PATH though!
cp target/opt/fht-compositor /somewhere/inside/PATH

Now install the required files in the appropriate locations

sh
install -Dm755 res/systemd/fht-compositor-session         -t /somewhere/inside/PATH
install -Dm644 res/systemd/fht-compositor.desktop         -t /usr/share/wayland-sessions
install -Dm644 res/systemd/fht-compositor.service         -t /etc/systemd/user
install -Dm644 res/systemd/fht-compositor-shutdown.target -t /etc/systemd/user

Build features

Do not compile the compositor with --all-features as some of these are reserved for dev/testing purposes (for exxample enabling profiling). Always refer to the Cargo.toml file before enabling features

Portals

Refer to the portals page if you want the included portal (you most likely want to)