diff options
author | Jani Välimaa <wally@mageia.org> | 2014-01-07 18:17:50 +0200 |
---|---|---|
committer | Jani Välimaa <wally@mageia.org> | 2014-01-07 18:17:50 +0200 |
commit | 6f23cdb13dd1e9dd8c2bb3bc131287d01e3c9fbe (patch) | |
tree | 2f4f22626f773c10cc1d99b1991368acb95f296f /perl-install/any.pm | |
parent | f558ee8a41f470badb1266dc5a4e65d5398d5003 (diff) | |
download | drakx-6f23cdb13dd1e9dd8c2bb3bc131287d01e3c9fbe.tar drakx-6f23cdb13dd1e9dd8c2bb3bc131287d01e3c9fbe.tar.gz drakx-6f23cdb13dd1e9dd8c2bb3bc131287d01e3c9fbe.tar.bz2 drakx-6f23cdb13dd1e9dd8c2bb3bc131287d01e3c9fbe.tar.xz drakx-6f23cdb13dd1e9dd8c2bb3bc131287d01e3c9fbe.zip |
Add minimal/experimental lightdm autologin support to drakboot
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r-- | perl-install/any.pm | 12 |
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})) { |