From 053195e5b92c46dc0aa06877b9202009b8ba33a7 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 13 Aug 2012 10:35:15 +0000 Subject: autologin: support lxdm & slim too (#3715, based on Derek Jennings suggestion) also install autologin for lxdm & slim too (backported from trunk) --- perl-install/any.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'perl-install/any.pm') diff --git a/perl-install/any.pm b/perl-install/any.pm index 76ad7509b..7b14429a8 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 { -- cgit v1.2.1