[Feature] Add autologin support (#841) (closes #200)

This is the simplest change I could come up with to add working autologin, only bit I really dislike is the event but it seemed like the cleanest way without refactoring.

Co-authored-by: ferreo <harderthanfire@gmail.com>
Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/841
Reviewed-by: AnErrupTion <anerruption@disroot.org>
Co-authored-by: ferreo <ferreo@noreply.codeberg.org>
Co-committed-by: ferreo <ferreo@noreply.codeberg.org>
This commit is contained in:
ferreo
2025-10-25 23:09:24 +02:00
committed by AnErrupTion
parent 15c78c838a
commit 0cf752f3b8
29 changed files with 160 additions and 8 deletions

View File

@@ -46,6 +46,30 @@ auth_fails = 10
# If set to null, battery status won't be shown
battery_id = null
# Automatic login configuration
# This feature allows Ly to automatically log in a user without password prompt.
# IMPORTANT: Both auto_login_user and auto_login_session must be set for this to work.
# Autologin only happens once at startup - it won't re-trigger after logout.
# PAM service name to use for automatic login
# The default service (ly-autologin) uses pam_permit to allow login without password
# The appropriate platform-specific PAM configuration (ly-autologin) will be used automatically
auto_login_service = ly-autologin
# Session name to launch automatically
# To find available session names, check the .desktop files in:
# - /usr/share/xsessions/ (for X11 sessions)
# - /usr/share/wayland-sessions/ (for Wayland sessions)
# Use the filename without .desktop extension, or the value of DesktopNames field
# Examples: "i3", "sway", "gnome", "plasma", "xfce"
# If null, automatic login is disabled
auto_login_session = null
# Username to automatically log in
# Must be a valid user on the system
# If null, automatic login is disabled
auto_login_user = null
# Background color id
bg = 0x00000000

View File

@@ -4,6 +4,7 @@ brightness_up = رفع السطوع
capslock = capslock
err_alloc = فشل في تخصيص الذاكرة
err_bounds = out-of-bounds index
err_brightness_change = فشل في تغيير سطوع الشاشة
err_chdir = فشل في فتح مجلد المنزل

View File

@@ -4,6 +4,7 @@ brightness_up = apujar brillantor
capslock = Bloq Majús
err_alloc = assignació de memòria fallida
err_bounds = índex fora de límits
err_brightness_change = error en canviar la brillantor
err_chdir = error en obrir la carpeta home

View File

@@ -4,6 +4,7 @@
capslock = capslock
err_alloc = alokace paměti selhala
err_bounds = index je mimo hranice pole
err_chdir = nelze otevřít domovský adresář

View File

@@ -4,6 +4,7 @@ brightness_up = Helligkeit+
capslock = Feststelltaste
err_alloc = Speicherzuweisung fehlgeschlagen
err_bounds = Index ausserhalb des Bereichs
err_brightness_change = Helligkeitsänderung fehlgeschlagen
err_chdir = Fehler beim Oeffnen des Home-Ordners

View File

@@ -4,6 +4,7 @@ brightness_up = increase brightness
capslock = capslock
custom = custom
err_alloc = failed memory allocation
err_autologin_session = autologin session not found
err_bounds = out-of-bounds index
err_brightness_change = failed to change brightness
err_chdir = failed to open home folder

View File

@@ -4,6 +4,7 @@ brightness_up = subir brillo
capslock = Bloq Mayús
err_alloc = asignación de memoria fallida
err_bounds = índice fuera de límites
err_chdir = error al abrir la carpeta home

View File

@@ -4,6 +4,7 @@ brightness_up = augmenter la luminosité
capslock = verr.maj
custom = customisé
err_alloc = échec d'allocation mémoire
err_bounds = indice hors-limite
err_brightness_change = échec du changement de luminosité
err_chdir = échec de l'ouverture du répertoire home

View File

@@ -4,6 +4,7 @@
capslock = capslock
err_alloc = impossibile allocare memoria
err_bounds = indice fuori limite
err_chdir = impossibile aprire home directory

View File

@@ -4,6 +4,7 @@ brightness_up = 明るさを上げる
capslock = CapsLock
err_alloc = メモリ割り当て失敗
err_bounds = 境界外インデックス
err_brightness_change = 明るさの変更に失敗しました
err_chdir = ホームフォルダを開けませんでした

View File

@@ -4,6 +4,7 @@ brightness_up = palielināt spilgtumu
capslock = caps lock
custom = pielāgots
err_alloc = neizdevās atmiņas piešķiršana
err_bounds = indekss ārpus robežām
err_brightness_change = neizdevās mainīt spilgtumu
err_chdir = neizdevās atvērt mājas mapi
@@ -68,4 +69,3 @@ sleep = snauda
wayland = wayland
x11 = x11
xinitrc = xinitrc

View File

@@ -4,6 +4,7 @@ brightness_up = zwiększ jasność
capslock = capslock
err_alloc = nieudana alokacja pamięci
err_bounds = indeks poza zakresem
err_brightness_change = nie udało się zmienić jasności
err_chdir = nie udało się otworzyć folderu domowego

View File

@@ -4,6 +4,7 @@
capslock = capslock
err_alloc = erro na atribuição de memória
err_bounds = índice fora de limites
err_chdir = erro ao abrir a pasta home

View File

@@ -4,6 +4,7 @@
capslock = caixa alta
err_alloc = alocação de memória malsucedida
err_bounds = índice fora de limites
err_chdir = não foi possível abrir o diretório home

View File

@@ -21,6 +21,7 @@ capslock = capslock
err_pam_abort = tranzacţie pam anulată
err_pam_acct_expired = cont expirat
err_pam_auth = eroare de autentificare

View File

@@ -4,6 +4,7 @@ brightness_up = увеличить яркость
capslock = capslock
err_alloc = не удалось выделить память
err_bounds = за пределами индекса
err_brightness_change = не удалось изменить яркость
err_chdir = не удалось открыть домашнюю папку

View File

@@ -4,6 +4,7 @@
capslock = capslock
err_alloc = neuspijesna alokacija memorije
err_bounds = izvan granica indeksa
err_chdir = neuspijesno otvaranje home foldera

View File

@@ -4,6 +4,7 @@
capslock = capslock
err_alloc = misslyckad minnesallokering
err_bounds = utanför banan index
err_chdir = misslyckades att öppna hemkatalog

View File

@@ -4,6 +4,7 @@
capslock = capslock
err_alloc = basarisiz bellek ayirma
err_bounds = sinirlarin disinda dizin
err_chdir = ev klasoru acilamadi

View File

@@ -4,6 +4,7 @@
capslock = capslock
err_alloc = невдале виділення пам'яті
err_bounds = поза межами індексу
err_chdir = не вдалося відкрити домашній каталог

View File

@@ -4,6 +4,7 @@
capslock = 大写锁定
err_alloc = 内存分配失败
err_bounds = 索引越界
err_chdir = 无法打开home文件夹

View File

@@ -0,0 +1,9 @@
#%PAM-1.0
# OpenPAM (used in FreeBSD) doesn't support prepending "-" for ignoring missing
# modules.
auth required pam_permit.so
auth include login
account include login
password include login
session include login

View File

@@ -0,0 +1,16 @@
#%PAM-1.0
auth required pam_permit.so
-auth optional pam_gnome_keyring.so
-auth optional pam_kwallet5.so
account include login
password include login
-password optional pam_gnome_keyring.so use_authtok
-session optional pam_systemd.so class=greeter
-session optional pam_elogind.so
session include login
-session optional pam_gnome_keyring.so auto_start
-session optional pam_kwallet5.so auto_start