diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-09-23 16:32:54 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-09-23 16:32:54 +0000 |
commit | a63798bd8a60df9a840d898144899dba37c37344 (patch) | |
tree | b53df65f30bb203555d28390369911a71a0774ef /perl-install | |
parent | c16d335cfd015275bb2b2813b38215df45001d8d (diff) | |
download | drakx-a63798bd8a60df9a840d898144899dba37c37344.tar drakx-a63798bd8a60df9a840d898144899dba37c37344.tar.gz drakx-a63798bd8a60df9a840d898144899dba37c37344.tar.bz2 drakx-a63798bd8a60df9a840d898144899dba37c37344.tar.xz drakx-a63798bd8a60df9a840d898144899dba37c37344.zip |
guess display manager from /etc/sysconfig/desktop, or default session, or /etc/X11/lookupdm
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/any.pm | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index c9701f761..b9418dd21 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -640,8 +640,21 @@ sub get_autologin() { my $gdm_file = "$::prefix/etc/X11/gdm/custom.conf"; my $kdm_file = common::read_alternative('kdm4-config'); my $desktop = $desktop{DESKTOP} || first(sessions()); + my %desktop_to_dm = ( + GNOME => 'gdm', + KDE4 => 'kdm', + ); + my %dm_canonical = ( + gnome => 'gdm', + kde => 'kdm', + ); + my $dm = + lc($desktop{DISPLAYMANAGER}) || + $desktop_to_dm{$desktop} || + chomp_(run_program::rooted_get_stdout("/etc/X11/lookupdm")); + $dm = $dm_canonical{$dm} if exists $dm_canonical{$dm}; my $autologin = do { - if (($desktop{DISPLAYMANAGER} || $desktop) eq 'GNOME') { + if ($dm eq "gdm") { my %conf = read_gnomekderc($gdm_file, 'daemon'); text2bool($conf{AutomaticLoginEnable}) && $conf{AutomaticLogin}; } else { # KDM / MdkKDM |