summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorJani Välimaa <wally@mageia.org>2014-01-07 18:17:50 +0200
committerJani Välimaa <wally@mageia.org>2014-01-07 18:17:50 +0200
commit6f23cdb13dd1e9dd8c2bb3bc131287d01e3c9fbe (patch)
tree2f4f22626f773c10cc1d99b1991368acb95f296f /perl-install
parentf558ee8a41f470badb1266dc5a4e65d5398d5003 (diff)
downloaddrakx-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')
-rw-r--r--perl-install/NEWS2
-rw-r--r--perl-install/any.pm12
2 files changed, 14 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 849561372..2647de79d 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,5 @@
+- add minimal/experimental lightdm autologin support to drakboot
+
Version 16.18 - 28 December 2013
- detecting input devices:
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})) {