Files
wayter/README.md
T

3.2 KiB

Wayland Greeter

A compact Rust + GTK4 graphical greeter for greetd. It uses greetd for PAM authentication and launches installed Wayland session entries, including Hyprland.

Current status

Early project build. The greeter UI and greetd IPC client are implemented; it has not yet been activated as the system login path. The target is a Gentoo amd64 musl + LLVM host with GTK4 installed.

Build

Build on the target Gentoo host so the binary links against the host's musl and GTK libraries:

cargo build --release

Native build requirements: Rust/Cargo, pkg-config, GTK4 development files, and a working Wayland GTK backend. This produces target/release/wayland-greeter; install it through a local ebuild or a reviewed manual installation step after confirming the output's dynamic dependencies.

Run under greetd

The application needs GREETD_SOCK, which greetd provides. A graphical greeter also needs a compositor. A typical setup is greetd → Cage → this app, then greetd starts Hyprland after authentication. Example only (adapt the executable path and service/init setup to the host):

[terminal]
vt = 1

[default_session]
command = "cage -s -- /usr/local/bin/wayland-greeter"
user = "greeter"

Cage and a greeter account must be installed/configured separately. Gentoo's compositor listing places Cage in the guru overlay (gui-wm/cage::guru), rather than the main Gentoo repository; inspect that overlay and the host's emerge -pv plan before considering it. Keep a working TTY login route before changing the greetd default session. Do not activate this configuration until the binary, Cage startup, PAM flow, session descriptors, VT switching, and rollback have been checked locally.

The session picker is hidden by default; press F2 to show or hide it. The login surface starts with only the username and login button; PAM prompts reveal the response field when needed. The picker reads *.desktop entries from /usr/share/wayland-sessions and /usr/local/share/wayland-sessions. If neither has entries, it offers a Hyprland fallback command. The selected entry's Exec is parsed into argv and passed to greetd directly, without shell expansion.

Colors

At startup the greeter reads ~/.config/wayter/colors.ini. The tracked colors.ini.example contains the current dark steel-blue palette; copy it into place with:

mkdir -p ~/.config/wayter
cp colors.ini.example ~/.config/wayter/colors.ini

Edit values in the [colors] section using six-digit hex colors such as accent = #6C99BB. Supported names are background, panel, surface, hover, border, focus, text, muted, dim, emphasis, accent, accent_secondary, and warning. Invalid values keep that color's built-in default, and a missing or unreadable file falls back to the full built-in palette.

Design notes

  • PAM prompts come from greetd IPC and are not assumed to be a single username/password exchange.
  • Secrets are never written to disk or logged.
  • The card is centered by GTK's center container in both dimensions. GTK CSS colors come from ~/.config/wayter/colors.ini; it uses Maple Mono and GTK4 system libraries.

The project is available under the MIT License.