summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-07-04 13:39:29 +0000
committerOlivier Blin <oblin@mandriva.com>2008-07-04 13:39:29 +0000
commit7b2305eddadc40833bc7765a47b1753efe09cbae (patch)
tree033dfba4dda5ebdafe7778eae0460474582d3b9e /perl-install/any.pm
parentf207ec9e1eaae9f4a548397b6f2dad4557d32913 (diff)
downloaddrakx-7b2305eddadc40833bc7765a47b1753efe09cbae.tar
drakx-7b2305eddadc40833bc7765a47b1753efe09cbae.tar.gz
drakx-7b2305eddadc40833bc7765a47b1753efe09cbae.tar.bz2
drakx-7b2305eddadc40833bc7765a47b1753efe09cbae.tar.xz
drakx-7b2305eddadc40833bc7765a47b1753efe09cbae.zip
detect KDE4 when configuring autologin
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 1d50f6a84..8b21db944 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -638,7 +638,7 @@ sub set_autologin {
)) };
my $xdm_autologin_cfg = "$::prefix/etc/sysconfig/autologin";
- if (member($o_wm, 'KDE', 'GNOME')) {
+ if (member($o_wm, 'KDE', 'KDE4', 'GNOME')) {
unlink $xdm_autologin_cfg;
} else {
$do_pkgs->ensure_is_installed('autologin', '/usr/bin/startx.autologin') if $o_user;
@@ -837,8 +837,9 @@ sub autologin {
my @wm = sessions();
my @users = map { $_->{name} } @{$o->{users} || []};
- if (member('KDE', @wm) && @users == 1 && $o->{meta_class} eq 'desktop') {
- $o->{desktop} = 'KDE';
+ my $kde_desktop = find { member($_, 'KDE', 'KDE4') } @wm;
+ if ($kde_desktop && @users == 1 && $o->{meta_class} eq 'desktop') {
+ $o->{desktop} = $kde_desktop;
$o->{autologin} = $users[0];
} elsif (@wm > 1 && @users && !$o->{authentication}{NIS} && $o->{security} <= 2) {
my $use_autologin = @users == 1;