Compare commits
2 Commits
cd42df1095
...
48d363bb18
| Author | SHA1 | Date | |
|---|---|---|---|
| 48d363bb18 | |||
| 448e4212e3 |
@ -1,7 +1,5 @@
|
||||
# Moongreet
|
||||
|
||||
**Name**: Selene (Mondgöttin — passend zu Moon-greet)
|
||||
|
||||
## Projekt
|
||||
|
||||
Moongreet ist ein greetd-Greeter für Wayland, gebaut mit Rust + gtk4-rs + gtk4-layer-shell.
|
||||
|
||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -575,7 +575,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "moongreet"
|
||||
version = "0.8.0"
|
||||
version = "0.8.3"
|
||||
dependencies = [
|
||||
"gdk-pixbuf",
|
||||
"gdk4",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "moongreet"
|
||||
version = "0.8.2"
|
||||
version = "0.8.3"
|
||||
edition = "2024"
|
||||
description = "A greetd greeter for Wayland with GTK4 and Layer Shell"
|
||||
license = "MIT"
|
||||
|
||||
13
DECISIONS.md
13
DECISIONS.md
@ -1,5 +1,12 @@
|
||||
# Decisions
|
||||
|
||||
## 2026-04-21 – Ship polkit rule in moongreet instead of moonarch (v0.8.3)
|
||||
|
||||
- **Who**: ClaudeCode, Dom
|
||||
- **Why**: Reboot/shutdown from the greeter silently failed on a fresh install. The polkit rule that grants the `greeter` user `org.freedesktop.login1.{reboot,power-off}` lived in the moonarch repo but was never installed by any PKGBUILD. The laptop worked only because the rule had been hand-deployed once.
|
||||
- **Tradeoffs**: Rule ownership moves from moonarch (system defaults) to moongreet (greeter-specific auth). Cleaner boundary — moonarch no longer needs to know about the greeter's auth requirements — but it means moongreet is now responsible for a system polkit rule that ties it to a fixed username (`greeter`).
|
||||
- **How**: Source file moved to `moongreet/config/polkit/50-moongreet-power.rules`, installed to `/etc/polkit-1/rules.d/` by `moongreet-git/PKGBUILD`. Old file removed from the moonarch repo.
|
||||
|
||||
## 2026-04-09 – Monitor hotplug via ListModel items-changed
|
||||
|
||||
- **Who**: ClaudeCode, Dom
|
||||
@ -51,7 +58,7 @@
|
||||
|
||||
## 2026-03-28 – Remove embedded wallpaper from binary
|
||||
|
||||
- **Who**: Selene, Dom
|
||||
- **Who**: ClaudeCode, Dom
|
||||
- **Why**: Wallpaper is installed by moonarch to /usr/share/moonarch/wallpaper.jpg. Embedding a 374K JPEG in the binary is redundant. GTK background color (Catppuccin Mocha base) is a clean fallback.
|
||||
- **Tradeoffs**: Without moonarch installed AND without config, greeter shows plain dark background instead of wallpaper. Acceptable — that's the expected minimal state.
|
||||
- **How**: Remove wallpaper.jpg from GResources, return None from resolve_background_path when no file found, skip wallpaper window creation and background picture when no path available.
|
||||
@ -65,13 +72,13 @@
|
||||
|
||||
## 2026-03-28 – Optional background blur via `image` crate (superseded)
|
||||
|
||||
- **Who**: Selene, Dom
|
||||
- **Who**: ClaudeCode, Dom
|
||||
- **Why**: Blurred wallpaper as greeter background is a common UX pattern for login screens
|
||||
- **Tradeoffs**: Adds `image` crate dependency (~15 transitive crates); CPU-side Gaussian blur at load time adds startup latency proportional to image size and sigma. Acceptable because blur runs once and the texture is shared across monitors.
|
||||
- **How**: `load_background_texture(bg_path, blur_radius)` loads texture, optionally applies `imageops::blur()`, returns blurred `gdk::Texture`. Config option `background-blur: Option<f32>` in `[appearance]` TOML section.
|
||||
|
||||
## 2026-03-28 – Audit fixes for shared wallpaper texture (v0.4.1)
|
||||
- **Who**: Selene, Dominik
|
||||
- **Who**: ClaudeCode, Dominik
|
||||
- **Why**: Quality, performance, and security audits flagged issues in `load_background_texture()`, debug logging, and greetd error handling
|
||||
- **Tradeoffs**: GResource path now requires UTF-8 (returns `None` for non-UTF-8 instead of aborting); 50 MB wallpaper limit is generous but prevents OOM; debug logging off by default trades observability for security
|
||||
- **How**: GResource branch via `resources_lookup_data()` + `from_bytes()` (no abort), file size limit, error details only at debug level, `MOONGREET_DEBUG` env var for log level, greetd retry path truncation matching `show_greetd_error()`
|
||||
|
||||
@ -60,6 +60,14 @@ sudo cp config/moongreet.toml /etc/moongreet/moongreet.toml
|
||||
user = "greeter"
|
||||
```
|
||||
|
||||
4. Install the polkit rule so the greeter user can reboot / power off:
|
||||
```bash
|
||||
sudo install -Dm644 config/polkit/50-moongreet-power.rules \
|
||||
/etc/polkit-1/rules.d/50-moongreet-power.rules
|
||||
```
|
||||
Without this rule, `loginctl reboot` / `loginctl poweroff` fail because
|
||||
greetd's greeter session is inactive in logind.
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
|
||||
12
config/polkit/50-moongreet-power.rules
Normal file
12
config/polkit/50-moongreet-power.rules
Normal file
@ -0,0 +1,12 @@
|
||||
// ABOUTME: Allow the greeter user to reboot and power off without authentication.
|
||||
// ABOUTME: Required because greetd's greeter session is inactive in logind.
|
||||
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (subject.user === "greeter" &&
|
||||
(action.id === "org.freedesktop.login1.reboot" ||
|
||||
action.id === "org.freedesktop.login1.reboot-multiple-sessions" ||
|
||||
action.id === "org.freedesktop.login1.power-off" ||
|
||||
action.id === "org.freedesktop.login1.power-off-multiple-sessions")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user