- i18n test: assert four previously-missing string fields so future locales cannot ship empty strings unnoticed. - greeter: atomic check-and-set fingerprint_probe_initializing to keep a fast user switch from spawning two parallel fprintd D-Bus inits. - greeter: set_avatar_from_file decodes via gio::File::read_future + Pixbuf::from_stream_at_scale_future inside glib::spawn_future_local; shows default icon first, swaps on completion. - greeter: cap MAX_WALLPAPER_FILE_SIZE at 10 MB and MAX_AVATAR_FILE_SIZE at 5 MB to bound worst-case decode latency. - config: apply the same symlink-rejection check to the Moonarch wallpaper fallback that the user-configured path already uses. - greeter: after login_worker returns, drop the cloned greetd socket held in shared state so repeated failed logins do not leak FDs.
Moongreet
A greetd greeter for Wayland, built with Rust + GTK4 + gtk4-layer-shell. Part of the Moonarch ecosystem.
Features
- greetd IPC — Communicates via
$GREETD_SOCK(length-prefixed JSON) - User list — Parsed from
/etc/passwd(UID 1000–65533) - Avatars — AccountsService icons,
~/.facefallback, default SVG with theme tinting - Sessions — Discovered from
/usr/share/wayland-sessions/and/usr/share/xsessions/ - Last user/session — Remembered in
/var/cache/moongreet/ - Power actions — Reboot / Shutdown via
loginctl - Layer Shell — Fullscreen via gtk4-layer-shell (TOP layer)
- Multi-monitor + hotplug — Full greeter UI on all monitors (keyboard input on first), hotplugged monitors get windows automatically
- GPU blur — Background blur via GskBlurNode (shared cache across monitors)
- i18n — German and English (auto-detected from system locale)
- Faillock warning — Warns after 2 failed attempts, locked message after 3
- Fingerprint — fprintd support via greetd multi-stage PAM (configurable)
- Journal logging —
journalctl -t moongreet, debug level viaMOONGREET_DEBUGenv var - Password wiping — Zeroize on drop
Requirements
- GTK 4
- gtk4-layer-shell (for Wayland fullscreen)
- greetd
Building
cargo build --release
Installation
# Install binary
sudo install -Dm755 target/release/moongreet /usr/bin/moongreet
# Install config
sudo mkdir -p /etc/moongreet
sudo cp config/moongreet.toml /etc/moongreet/moongreet.toml
System Setup
-
Edit
/etc/moongreet/moongreet.toml— set an absolute path for the wallpaper. -
Create cache directory:
sudo mkdir -p /var/cache/moongreet/last-session sudo chown greeter:greeter /var/cache/moongreet -
Configure greetd (
/etc/greetd/config.toml):[default_session] command = "niri -c /etc/greetd/niri-greeter.kdl" user = "greeter" -
Install the polkit rule so the greeter user can reboot / power off:
sudo install -Dm644 config/polkit/50-moongreet-power.rules \ /etc/polkit-1/rules.d/50-moongreet-power.rulesWithout this rule,
loginctl reboot/loginctl powerofffail because greetd's greeter session is inactive in logind.
Development
# Run tests
cargo test
# Build release
cargo build --release
# Run locally (without greetd, disables layer-shell)
MOONGREET_NO_LAYER_SHELL=1 ./target/release/moongreet
License
MIT
Description
Languages
Rust
97.8%
CSS
1.4%
Shell
0.8%