Krolyxon
Commit f4371d9

Branches

Refs →

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
Author
krolyxon
Date
2026-11-04 18:15 +0530
Parent
4b25a0d
Commit
f4371d97b2637e50f351a8913af2dc32916ec831

+31 −0

4 files changed

  1. M .config/hypr/hyprland.lua +3 −0
  2. M install.sh +14 −0
  3. A system/etc/pam.d/login +9 −0
  4. A system/etc/pam.d/passwd +5 −0
M .config/hypr/hyprland.lua View
@@ -18,6 +18,9 @@ colors = ok and c or { primary = "rgba(80d5cbff)", surface = "rgba(0e1514ff)", s
1818 -- Autostart
1919 -- -----------------------------------------------------
2020 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")
2124 -- GTK3 on Wayland reads its theme + icons from gsettings, not settings.ini (colours: gtk-3.0/gtk.css, matugen)
2225 hl.exec_cmd("gsettings set org.gnome.desktop.interface gtk-theme adw-gtk3-dark")
2326 hl.exec_cmd("gsettings set org.gnome.desktop.interface icon-theme Papirus-Dark")
M install.sh View
@@ -228,6 +228,7 @@ This script is provided AS IS, WITHOUT ANY WARRANTY. It will:
228228 • Move conflicting files in your \$HOME to ~/.aurora-backup/
229229 • Change your login shell to zsh
230230 • Optionally write /etc/keyd and enable keyd
231+• Optionally write /etc/pam.d/{login,passwd} (GNOME keyring unlock)
231232 • Enable the aurora-shell.service user unit
232233
233234 Proceed at your OWN RISK."
@@ -374,6 +375,19 @@ if command -v keyd >/dev/null 2>&1; then
374375 fi
375376
376377
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+
377391 #########################
378392 ## Enable aurora shell ##
379393 #########################
A system/etc/pam.d/login View
@@ -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
A system/etc/pam.d/passwd View
@@ -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