summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-07-26 10:37:09 +0000
committerThierry Vignaud <tv@mageia.org>2012-07-26 10:37:09 +0000
commitedb1f9172ad098477c6fe933ad95f5ef08e3a2e1 (patch)
tree62d177959ad39070221c5ac0aaf5240dcc3aecc6 /perl-install
parent893de173062895d46f8458ad6bcdc84c95653af9 (diff)
downloaddrakx-edb1f9172ad098477c6fe933ad95f5ef08e3a2e1.tar
drakx-edb1f9172ad098477c6fe933ad95f5ef08e3a2e1.tar.gz
drakx-edb1f9172ad098477c6fe933ad95f5ef08e3a2e1.tar.bz2
drakx-edb1f9172ad098477c6fe933ad95f5ef08e3a2e1.tar.xz
drakx-edb1f9172ad098477c6fe933ad95f5ef08e3a2e1.zip
autologin: support lxdm & slim too (#3715, based on Derek Jennings
suggestion) also install autologin for lxdm & slim too
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS3
-rw-r--r--perl-install/any.pm10
2 files changed, 11 insertions, 2 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 1cf44c1ee..c7fed68ea 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,6 @@
+- autologin:
+ o support lxdm & slim too (#3715, Derek Jennings)
+ o install autologin for lxdm & slim too
- drakxservices:
o when listing services ensure disabled services that can be enabled are
shown (mga#6843)
diff --git a/perl-install/any.pm b/perl-install/any.pm
index c95ab95fc..c2f7872dc 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -707,6 +707,11 @@ sub get_autologin() {
{ user => $autologin_user, desktop => $desktop, dm => $dm };
}
+sub is_standalone_autologin_needed {
+ my ($dm) = @_;
+ return member($dm, qw(lxdm slim xdm));
+}
+
sub set_autologin {
my ($do_pkgs, $autologin) = @_;
log::l("set_autologin $autologin->{user} $autologin->{desktop}");
@@ -715,7 +720,7 @@ sub set_autologin {
$autologin->{dm} ||= 'xdm';
$do_pkgs->ensure_is_installed($autologin->{dm})
or return;
- if ($autologin->{user} && $autologin->{dm} eq 'xdm') {
+ if ($autologin->{user} && is_standalone_autologin_needed($autologin->{dm})) {
$do_pkgs->ensure_is_installed('autologin', '/usr/bin/startx.autologin')
or return;
}
@@ -735,7 +740,8 @@ sub set_autologin {
)) } if -e $gdm_conffile;
my $xdm_autologin_cfg = "$::prefix/etc/sysconfig/autologin";
- if ($autologin->{dm} eq 'xdm') {
+ # TODO: configure lxdm in /etx/lxdm/lxdm.conf
+ if (is_standalone_autologin_needed($autologin->{dm})) {
setVarsInShMode($xdm_autologin_cfg, 0644,
{ USER => $autologin->{user}, AUTOLOGIN => bool2yesno($autologin->{user}), EXEC => '/usr/bin/startx.autologin' });
} else {