summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 3e90bc32f..232880047 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -658,11 +658,13 @@ 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 $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());
my %desktop_to_dm = (
GNOME => 'gdm',
KDE4 => 'kdm',
+ xfce4 => 'lightdm',
LXDE => 'lxdm',
);
my %dm_canonical = (
@@ -682,6 +684,9 @@ sub get_autologin() {
} elsif ($dm eq "kdm") {
my %conf = read_gnomekderc($kdm_file, 'X-:0-Core');
$autologin_user = text2bool($conf{AutoLoginEnable}) && $conf{AutoLoginUser};
+ } elsif ($dm eq "lightdm") {
+ my %conf = read_gnomekderc($lightdm_file, 'SeatDefaults');
+ $autologin_user = text2bool($conf{'#dummy-autologin'}) && $conf{autologin-user};
} else {
my %conf = getVarsFromSh($autologin_file);
$autologin_user = text2bool($conf{AUTOLOGIN}) && $conf{USER};
@@ -722,6 +727,13 @@ sub set_autologin {
AutomaticLogin => $autologin->{user},
)) } if -e $gdm_conffile;
+ #- Configure LIGHTDM
+ my $lightdm_conffile = "$::prefix/etc/lightdm/lightdm.conf.d/50-mageia-autologin.conf";
+ eval { update_gnomekderc($lightdm_conffile, SeatDefaults => (
+ '#dummy-autologin' => $do_autologin,
+ 'autologin-user' => $autologin->{user}
+ )) } if -e $lightdm_conffile;
+
my $xdm_autologin_cfg = "$::prefix/etc/sysconfig/autologin";
# TODO: configure lxdm in /etx/lxdm/lxdm.conf
if (is_standalone_autologin_needed($autologin->{dm})) {