SUSE DM: add special case configuring autologin in sysconfig (openSUSE)
FIXES #582
This commit is contained in:
parent
984a83deb9
commit
9561bac1c8
@ -20,3 +20,7 @@ displaymanagers:
|
|||||||
#display manager are set up correctly. This is normally done by the distribution
|
#display manager are set up correctly. This is normally done by the distribution
|
||||||
#packages, and best left to them. Therefore, it is disabled by default.
|
#packages, and best left to them. Therefore, it is disabled by default.
|
||||||
basicSetup: false
|
basicSetup: false
|
||||||
|
|
||||||
|
#If true, setup autologin for openSUSE. This only makes sense on openSUSE
|
||||||
|
#derivatives or other systems where /etc/sysconfig/displaymanager exists.
|
||||||
|
sysconfigSetup: false
|
||||||
|
@ -355,6 +355,18 @@ def set_autologin(username,
|
|||||||
with open(sddm_conf_path, 'w') as sddm_config_file:
|
with open(sddm_conf_path, 'w') as sddm_config_file:
|
||||||
sddm_config.write(sddm_config_file, space_around_delimiters=False)
|
sddm_config.write(sddm_config_file, space_around_delimiters=False)
|
||||||
|
|
||||||
|
if "sysconfig" == displaymanager:
|
||||||
|
dmauto = "DISPLAYMANAGER_AUTOLOGIN"
|
||||||
|
|
||||||
|
os.system(
|
||||||
|
"sed -i -e 's|^{!s}=.*|{!s}=\"{!s}\"|' "
|
||||||
|
"{!s}/etc/sysconfig/displaymanager".format(
|
||||||
|
dmauto, dmauto,
|
||||||
|
username if do_autologin else "",
|
||||||
|
root_mount_point
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
@ -662,6 +674,11 @@ def run():
|
|||||||
)
|
)
|
||||||
if dm_message is not None:
|
if dm_message is not None:
|
||||||
dm_setup_message.append("{!s}: {!s}".format(*dm_message))
|
dm_setup_message.append("{!s}: {!s}".format(*dm_message))
|
||||||
|
|
||||||
|
if ("sysconfigSetup" in libcalamares.job.configuration
|
||||||
|
and libcalamares.job.configuration["sysconfigSetup"]):
|
||||||
|
set_autologin(username, "sysconfig", None, root_mount_point)
|
||||||
|
|
||||||
if dm_setup_message:
|
if dm_setup_message:
|
||||||
return ("Display manager configuration was incomplete",
|
return ("Display manager configuration was incomplete",
|
||||||
"\n".join(dm_setup_message))
|
"\n".join(dm_setup_message))
|
||||||
|
Loading…
Reference in New Issue
Block a user