Skip to content

Build from source

Ubuntu 26.04:

Terminal window
sudo apt install libgtk-3-dev libgtk-layer-shell-dev libasound2-dev libmpv-dev

Optional, loaded at run time — each feature is unavailable without its library:

Package Needed for
libgtk-session-lock0, libpam the lock screen
libeis1 input capture (Deskflow, Input Leap)
libnm0 importing a VPN file (OpenVPN and PPTP also need their NetworkManager-* plugin)
power-profiles-daemon or tuned-ppd Settings › Power modes

Moonswing uses Flutter’s experimental windowing API on the master channel:

Terminal window
sudo snap install flutter --classic
flutter channel master
flutter upgrade
flutter config --enable-windowing # once per machine; the build fails without it
Terminal window
make install # to ~/.local
make install PREFIX=/usr/local # or elsewhere

This installs the bundle to $PREFIX/lib/moonswing, wallpapers to $PREFIX/share/moonswing, a moonswing launcher to $PREFIX/bin (put it on your PATH), and registers the portal backend. It also installs the shell’s four apps of their own: Moonkan, the todo board, Moonlab, the code dashboard, Moonmonitor, the system monitor, and Moonsettings, the settings. To build only: make build (and make build-moonkan, make build-moonlab, make build-moonmonitor, make build-moonsettings).

Portal backend (make install-portal, run by make install) — installs moonswing.portal under XDG_DATA_HOME, and a mir-portals.conf under XDG_CONFIG_HOME unless you already have one. If you do, add:

[preferred]
org.freedesktop.impl.portal.ScreenCast=moonswing
org.freedesktop.impl.portal.InputCapture=moonswing

Then systemctl --user restart xdg-desktop-portal.

PAM service — sudo make install-pam writes /etc/pam.d/moonswing. Without it the lock screen uses the login service.

Terminal window
make uninstall
sudo make uninstall-pam

mir-portals.conf is left in place.