greetd-moongreet/README.md
nevaforget cd42df1095
All checks were successful
Update PKGBUILD version / update-pkgver (push) Successful in 2s
fix: handle monitor hotplug for greeter windows (v0.8.2)
Greeter windows were only created at startup. Hotplugged monitors (e.g.
HDMI reconnect) would show no UI. Connect to the monitor ListModel's
items-changed signal to create greeter windows for newly added monitors.

Aligned with moonlock's hotplug fix using the same pattern adapted for
gtk4-layer-shell (ListModel) instead of session-lock (connect_monitor).
2026-04-09 15:06:29 +02:00

79 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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 100065533)
- **Avatars** — AccountsService icons, `~/.face` fallback, 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 via `MOONGREET_DEBUG` env var
- **Password wiping** — Zeroize on drop
## Requirements
- GTK 4
- gtk4-layer-shell (for Wayland fullscreen)
- greetd
## Building
```bash
cargo build --release
```
## Installation
```bash
# 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
1. Edit `/etc/moongreet/moongreet.toml` — set an absolute path for the wallpaper.
2. Create cache directory:
```bash
sudo mkdir -p /var/cache/moongreet/last-session
sudo chown greeter:greeter /var/cache/moongreet
```
3. Configure greetd (`/etc/greetd/config.toml`):
```ini
[default_session]
command = "niri -c /etc/greetd/niri-greeter.kdl"
user = "greeter"
```
## Development
```bash
# 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