feat(desktop): theme the installed tuigreet console login
Some checks are pending
ci / test (push) Waiting to run

This commit is contained in:
Phoebus 2026-10-03 04:06:39 -07:00
parent d461721152
commit 6054bc43dd
5 changed files with 85 additions and 1 deletions

View file

@ -5,6 +5,15 @@ this file is the curated, human-readable summary.
## Unreleased — Fast defaults with user-controlled source builds
- **Slate console login (2026-10-03).** Installed Phoebus systems now give
tuigreet a short welcome greeting and soft white controls, and set the Linux
virtual-console palette to the slate background shown in tuigreet's Usage
screenshot. `sys-apps/kbd` supplies `setvtrgb`; a failed palette setup leaves
authentication available. The palette affects text virtual consoles, while
Mango retains its own colors. The existing VM's black greeter was captured
before the change; first-boot visual verification of the new palette is
pending.
- **External Portage overlay discovery (2026-10-02).** `sys search <term>
--legacy --overlays` adds read-only GPO leads to the configured package
catalogue. Leads are visibly unverified and never become install candidates

View file

@ -3,6 +3,18 @@
Rolling note between work sessions. **Update this file before you finish**, then
commit it. It should be short and current; use `git log` for detail.
- **Tuigreet slate login (2026-10-03):** The visible playground's installed
greeter is the stock white-on-black VT; a host screenshot confirmed the
centered form and clock already work. The installed greetd command now adds
a Phoebus greeting and soft white theme. A greetd pre-start drop-in applies
a Nord slate VT palette with `setvtrgb`, supplied explicitly by
`sys-apps/kbd`; failure of the color setup does not block login. Generated
config/palette/drop-in tests and the Rust gates pass. The currently running
encrypted VM still has the old root-owned config; apply the new assets only
after an authenticated guest login, then restart greetd or reboot and capture
the new login screen. The 20 GiB free-space gate for a fresh ISO/VM is still
unmet.
- **External overlay leads (2026-10-02):** GPO lists
`app-misc/chatgpt-desktop` in Gentoo community overlays, but `sys search`
previously queried only Portage repositories enabled locally. The new

View file

@ -307,6 +307,7 @@ A fresh install with these defaults is not yet verified.
| Mango + DankMaterialShell profile | yes | yes | live VM yes; installed desktop_install yes (347 pkgs); **seatd service active and running on detached boot** (`/run/seatd.sock` 0660 root:seat, `phoebus` in seat group); greeter, seat, DRM, PAM authentication and `sys --legacy` are verified | no |
| Mango is the canonical desktop | yes | yes | fresh candidate installed graphical seat 30/30: Mango + DMS, first-login Phoebus welcome, terminal, spotlight, lock/unlock/logout | no |
| greetd login (Mango + DarkMaterial) | yes | yes | authenticated seat0 + DRM card0 graphical login and logout, `gui-desktop-20261001T084157Z-ccefa3e1` | no |
| Slate tuigreet login palette and greeting | yes | yes (generated greetd TOML, 16-color VT palette, installed drop-in and package) | existing VM black baseline captured; new palette visual check pending | no |
| Live desktop ISO (Mango + DMS) | yes | guards tested | candidate ISO SHA `b14f37e1…c7b986b5281`: UEFI GUI 32/32, real OpenCode 18/18; embedded static binaries match | no |
| Live welcome autostart + duplicate prevention | yes | guards tested | live graphical VM | no |
| Welcome primary action keyboard-focus | yes | guards tested | live graphical VM | no |

View file

@ -110,6 +110,9 @@ pub fn mango_desktop_packages() -> Vec<&'static str> {
// Login & Greeter
"gui-libs/greetd",
"gui-apps/tuigreet",
// setvtrgb gives the Linux virtual console the slate background used
// by the Phoebus greeter; tuigreet cannot set the VT background itself.
"sys-apps/kbd",
// Seat management: seatd backs libseat when the logind session is
// absent or delayed (the P0 Mango crash was libseat finding no
// backend under the tuigreet session). Enabled in
@ -2520,11 +2523,29 @@ pub fn greetd_config(default_cmd: &str) -> String {
vt = 7\n\
\n\
[default_session]\n\
command = \"tuigreet --time --remember --remember-session --sessions /usr/share/wayland-sessions --cmd {default_cmd}\"\n\
command = \"tuigreet --time --greeting 'Welcome to Phoebus OS' --theme 'border=white;text=white;time=white;container=black;greet=white;prompt=white;input=white;action=white;button=black' --remember --remember-session --sessions /usr/share/wayland-sessions --cmd {default_cmd}\"\n\
user = \"greeter\"\n"
)
}
/// Linux VT palette, using the slate and soft white colors of the tuigreet
/// usage screenshot. `setvtrgb` expects red, green, and blue rows of 16 values.
/// The palette is system-wide for virtual consoles; graphical sessions have
/// their own colors.
pub fn greetd_vt_palette() -> &'static str {
"46,191,163,235,129,180,136,216,76,191,163,235,129,180,136,236\n\
52,97,190,203,161,142,192,222,86,97,190,203,161,142,192,239\n\
64,106,140,139,193,173,208,233,106,106,140,139,193,173,208,244\n"
}
/// Apply the VT palette before the greeter starts. A palette failure must not
/// prevent authentication, so systemd ignores this optional pre-start error.
pub fn greetd_palette_dropin() -> &'static str {
"# Phoebus console colors for the installed tuigreet login.\n\
[Service]\n\
ExecStartPre=-/usr/bin/env setvtrgb /etc/greetd/phoebus.vtrgb\n"
}
/// The live-ISO greetd configuration: a live-only automatic login into the
/// desktop, with a greeter fallback. This must never be written to an installed
/// system.
@ -3333,8 +3354,26 @@ mod tests {
// The installed system must never autologin.
assert!(!cfg.contains("[initial_session]"));
assert!(cfg.contains("tuigreet"));
assert!(cfg.contains("--greeting 'Welcome to Phoebus OS'"));
assert!(cfg.contains("--theme 'border=white;text=white;time=white;container=black;"));
assert!(cfg.contains("--sessions /usr/share/wayland-sessions"));
assert!(cfg.contains("--cmd /usr/local/bin/phoebus-session-mango"));
assert!(mango_desktop_packages().contains(&"sys-apps/kbd"));
let palette = greetd_vt_palette();
let rows: Vec<Vec<u8>> = palette
.lines()
.map(|row| {
row.split(',')
.map(str::parse)
.collect::<Result<_, _>>()
.unwrap()
})
.collect();
assert_eq!(rows.len(), 3);
assert!(rows.iter().all(|row| row.len() == 16));
assert_eq!((rows[0][0], rows[1][0], rows[2][0]), (46, 52, 64));
assert!(greetd_palette_dropin()
.contains("ExecStartPre=-/usr/bin/env setvtrgb /etc/greetd/phoebus.vtrgb"));
// The live configuration is separate and does autologin.
let live = greetd_config_live("phoebus", "/usr/local/bin/phoebus-session-mango");

View file

@ -245,6 +245,16 @@ pub fn configure_login(
"etc/greetd/config.toml",
sysgen::greetd_config(cmd),
)?;
write_public(
&target,
"etc/greetd/phoebus.vtrgb",
sysgen::greetd_vt_palette(),
)?;
write_public(
&target,
"etc/systemd/system/greetd.service.d/phoebus-palette.conf",
sysgen::greetd_palette_dropin(),
)?;
ensure_greeter_user(exec)?;
let root = Path::new(&exec.root);
if let Some(service) = sysgen::vm_guest_service(hardware.virtual_machine) {
@ -810,6 +820,19 @@ mod tests {
let login = std::fs::read_to_string(exec.root.join("etc/greetd/config.toml")).unwrap();
assert!(login.contains("phoebus-session-mango"));
assert!(login.contains("tuigreet"));
assert!(login.contains("--greeting 'Welcome to Phoebus OS'"));
assert_eq!(
std::fs::read_to_string(exec.root.join("etc/greetd/phoebus.vtrgb")).unwrap(),
sysgen::greetd_vt_palette()
);
assert_eq!(
std::fs::read_to_string(
exec.root
.join("etc/systemd/system/greetd.service.d/phoebus-palette.conf")
)
.unwrap(),
sysgen::greetd_palette_dropin()
);
assert!(
!login.contains("[initial_session]"),
"installed login must not autologin"