auroraf4371d9
pam: unlock GNOME keyring at login
tty1 autologs in, so Hyprland starts hyprlock as the login screen; its PAM stack includes login, which now has pam_gnome_keyring. passwd keeps the keyring password in sync. install.sh can copy both to /etc/pam.d. Fixes #1
+31 −0
4 files changed
- M .config/hypr/hyprland.lua +3 −0
- M install.sh +14 −0
- A system/etc/pam.d/login +9 −0
- A system/etc/pam.d/passwd +5 −0
| @@ -18,6 +18,9 @@ colors = ok and c or { primary = "rgba(80d5cbff)", surface = "rgba(0e1514ff)", s | |||
| 18 | 18 | -- Autostart | |
| 19 | 19 | -- ----------------------------------------------------- | |
| 20 | 20 | hl.on("hyprland.start", function() | |
| 21 | + | -- tty1 autologs in, so hyprlock is the login screen: its password unlocks the GNOME keyring | |
| 22 | + | -- (/etc/pam.d/login has pam_gnome_keyring, hyprlock includes it; system/etc/pam.d) | |
| 23 | + | hl.exec_cmd("pidof hyprlock || hyprlock") | |
| 21 | 24 | -- GTK3 on Wayland reads its theme + icons from gsettings, not settings.ini (colours: gtk-3.0/gtk.css, matugen) | |
| 22 | 25 | hl.exec_cmd("gsettings set org.gnome.desktop.interface gtk-theme adw-gtk3-dark") | |
| 23 | 26 | hl.exec_cmd("gsettings set org.gnome.desktop.interface icon-theme Papirus-Dark") | |
| @@ -228,6 +228,7 @@ This script is provided AS IS, WITHOUT ANY WARRANTY. It will: | |||
| 228 | 228 | • Move conflicting files in your \$HOME to ~/.aurora-backup/ | |
| 229 | 229 | • Change your login shell to zsh | |
| 230 | 230 | • Optionally write /etc/keyd and enable keyd | |
| 231 | + | • Optionally write /etc/pam.d/{login,passwd} (GNOME keyring unlock) | |
| 231 | 232 | • Enable the aurora-shell.service user unit | |
| 232 | 233 | ||
| 233 | 234 | Proceed at your OWN RISK." | |
| @@ -374,6 +375,19 @@ if command -v keyd >/dev/null 2>&1; then | |||
| 374 | 375 | fi | |
| 375 | 376 | ||
| 376 | 377 | ||
| 378 | + | ############################ | |
| 379 | + | ## GNOME keyring on login ## | |
| 380 | + | ############################ | |
| 381 | + | # pam_gnome_keyring unlocks the "login" keyring with the login password (tty login and hyprlock, | |
| 382 | + | # whose PAM file includes login); passwd keeps the keyring password in sync. | |
| 383 | + | if confirm "Unlock GNOME keyring at login (writes /etc/pam.d/login and passwd)?"; then | |
| 384 | + | log INFO "Copying PAM files to /etc/pam.d" | |
| 385 | + | sudo cp "$currentDir/system/etc/pam.d/login" "$currentDir/system/etc/pam.d/passwd" /etc/pam.d/ \ | |
| 386 | + | && log SUCCESS "GNOME keyring unlocks at login" \ | |
| 387 | + | || log ERROR "Couldn't write /etc/pam.d" | |
| 388 | + | fi | |
| 389 | + | ||
| 390 | + | ||
| 377 | 391 | ######################### | |
| 378 | 392 | ## Enable aurora shell ## | |
| 379 | 393 | ######################### | |
| @@ -0,0 +1,9 @@ | |||
| 1 | + | #%PAM-1.0 | |
| 2 | + | ||
| 3 | + | auth requisite pam_nologin.so | |
| 4 | + | auth include system-local-login | |
| 5 | + | auth optional pam_gnome_keyring.so | |
| 6 | + | account include system-local-login | |
| 7 | + | session include system-local-login | |
| 8 | + | session optional pam_gnome_keyring.so auto_start | |
| 9 | + | password include system-local-login | |
| @@ -0,0 +1,5 @@ | |||
| 1 | + | #%PAM-1.0 | |
| 2 | + | auth include system-auth | |
| 3 | + | account include system-auth | |
| 4 | + | password include system-auth | |
| 5 | + | password optional pam_gnome_keyring.so | |