mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 17:35:37 -04:00
displaymanager: Set Session= for sddm autologin.
Detect the correct value using find_desktop_environment.
This commit is contained in:
parent
467d78dde6
commit
8512e43405
1 changed files with 5 additions and 0 deletions
|
@ -171,6 +171,11 @@ def set_autologin(username, displaymanagers, root_mount_point):
|
|||
# User= line, possibly commented out
|
||||
if re.match('\\s*(?:#\\s*)?User=', line):
|
||||
line = 'User={}\n'.format(username)
|
||||
# Session= line, commented out or with empty value
|
||||
if re.match('\\s*#\\s*Session=|\\s*Session=$', line):
|
||||
default_desktop_environment = find_desktop_environment(root_mount_point)
|
||||
if default_desktop_environment != None:
|
||||
line = 'Session={}.desktop\n'.format(default_desktop_environment.desktop_file)
|
||||
sddm_conf.write(line)
|
||||
|
||||
return None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue