From b64e8c831dd31738e57bc871383b64f77e9eb990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20M=C3=BCller?= Date: Wed, 22 Apr 2020 20:22:16 +0200 Subject: [PATCH] [displaymanager] update OEM autologin --- src/modules/displaymanager/main.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/modules/displaymanager/main.py b/src/modules/displaymanager/main.py index a737ece60..1529aab17 100644 --- a/src/modules/displaymanager/main.py +++ b/src/modules/displaymanager/main.py @@ -3,7 +3,7 @@ # # === This file is part of Calamares - === # -# Copyright 2014-2018 & 2020, Philip Müller +# Copyright 2014-2018, Philip Müller # Copyright 2014-2015, Teo Mrnjavac # Copyright 2014, Kevin Kofler # Copyright 2017, Alf Gaida @@ -288,8 +288,10 @@ class DMmdm(DisplayManager): with open(mdm_conf_path, 'w') as mdm_conf: for line in text: if 'AutomaticLogin=' in line: - line = "AutomaticLogin={!s}\n".format(username) - elif '[daemon]' in line: + line = "" + if 'AutomaticLoginEnable=True' in line: + line = "" + if '[daemon]' in line: if do_autologin: line = ( "[daemon]\n" @@ -399,8 +401,10 @@ class DMgdm(DisplayManager): with open(gdm_conf_path, 'w') as gdm_conf: for line in text: if 'AutomaticLogin=' in line: - line = "AutomaticLogin={!s}\n".format(username) - elif '[daemon]' in line: + line = "" + if 'AutomaticLoginEnable=True' in line: + line = "" + if '[daemon]' in line: if do_autologin: line = ( "[daemon]\n"