diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-08-03 16:52:00 -0400 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-08-13 00:52:38 +0200 |
commit | d72df37ce84c0fc006c141fb5f44a7034a69f427 (patch) | |
tree | 27f187ce4ca7da300382c51c6d334348c7fe3b30 /perl-install/any.pm | |
parent | a3ef4658e46e088e47acbec6140e1f6820c8d64a (diff) | |
download | drakx-d72df37ce84c0fc006c141fb5f44a7034a69f427.tar drakx-d72df37ce84c0fc006c141fb5f44a7034a69f427.tar.gz drakx-d72df37ce84c0fc006c141fb5f44a7034a69f427.tar.bz2 drakx-d72df37ce84c0fc006c141fb5f44a7034a69f427.tar.xz drakx-d72df37ce84c0fc006c141fb5f44a7034a69f427.zip |
autologin: add support for SDDM (mga#17913)
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r-- | perl-install/any.pm | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index 529dcb9f3..4615f2b74 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -669,7 +669,7 @@ sub setupBootloader__grub2 { sub get_autologin() { my %desktop = getVarsFromSh("$::prefix/etc/sysconfig/desktop"); my $gdm_file = "$::prefix/etc/X11/gdm/custom.conf"; - my $kdm_file = common::read_alternative('kdm4-config'); + my $sddm_file = "$::prefix/etc/sddm.conf"; my $lightdm_conffile = "$::prefix/etc/lightdm/lightdm.conf.d/50-mageia-autologin.conf"; my $autologin_file = "$::prefix/etc/sysconfig/autologin"; my $desktop = $desktop{DESKTOP} || first(sessions()); @@ -693,9 +693,9 @@ sub get_autologin() { if ($dm eq "gdm") { my %conf = read_gnomekderc($gdm_file, 'daemon'); $autologin_user = text2bool($conf{AutomaticLoginEnable}) && $conf{AutomaticLogin}; - } elsif ($dm eq "kdm") { - my %conf = read_gnomekderc($kdm_file, 'X-:0-Core'); - $autologin_user = text2bool($conf{AutoLoginEnable}) && $conf{AutoLoginUser}; + } elsif ($dm eq "sddm") { + my %conf = read_gnomekderc($sddm_file, 'Autologin'); + $autologin_user = $conf{User}; } elsif ($dm eq "lightdm") { my %conf = read_gnomekderc($lightdm_conffile, 'Seat:*'); $autologin_user = text2bool($conf{'#dummy-autologin'}) && $conf{"autologin-user"}; @@ -725,12 +725,12 @@ sub set_autologin { or return; } - #- Configure KDM / MDKKDM - my $kdm_conffile = common::read_alternative('kdm4-config'); - eval { common::update_gnomekderc_no_create($kdm_conffile, 'X-:0-Core' => ( - AutoLoginEnable => $do_autologin, - AutoLoginUser => $autologin->{user}, - )) } if -e $kdm_conffile; + #- Configure SDDM + my $sddm_conffile = "$::prefix/etc/sddm.conf"; + eval { common::update_gnomekderc_no_create($sddm_conffile, 'Autologin' => ( + Session => $autologin->{desktop}, + User => $autologin->{user}, + )) } if -e $sddm_conffile; #- Configure GDM my $gdm_conffile = "$::prefix/etc/X11/gdm/custom.conf"; |