From f6fb10dd51fff62d4ff274829f1b33a4cca68f0b Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Tue, 20 Nov 2018 18:33:44 +0000 Subject: Fix DM preference when none is selected. /etc/X11/lookupdm has been removed from initscripts, but we still need that functionality to select the preferred DM during installation. --- perl-install/NEWS | 1 + perl-install/any.pm | 12 +++++++++++- perl-install/install/NEWS | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/perl-install/NEWS b/perl-install/NEWS index a1ffe8ac6..6699740de 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,4 @@ +- drakdm: fix DM preference when none is selected (don't default to XDM) - fix some DE name/capitalisation inconsistencies (mga#23634 + others) Version 18.5 - 19 Nov 2018 diff --git a/perl-install/any.pm b/perl-install/any.pm index 0c7110da9..8cd3ead4c 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -756,6 +756,15 @@ sub adapt_desktop_for_plasma { return $desktop ? ($h{$desktop} || lc($desktop)) . '.desktop' : ''; } +sub available_dms() { + my @l; + foreach (glob("$::prefix/usr/share/X11/dm.d/*.conf")) { + my %dm = getVarsFromSh($_); + push @l, $dm{EXEC} if $dm{EXEC}; + } + @l; +} + sub get_autologin() { my %desktop = getVarsFromSh("$::prefix/etc/sysconfig/desktop"); my $gdm_file = "$::prefix/etc/X11/gdm/custom.conf"; @@ -772,7 +781,8 @@ sub get_autologin() { ); my $dm = basename(readlink("$::prefix/etc/systemd/system/display-manager.service")) =~ s/(.*)\.service/$1/r || - $desktop_to_dm{$desktop}; + $desktop_to_dm{$desktop} || + basename(first(available_dms())); my $autologin_user; if ($dm eq "gdm") { diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 383945ce8..d51e5a8dc 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,4 @@ +- fix DM preference when none is selected (don't default to XDM) - fix some DE name/capitalisation inconsistencies (mga#23634 + others) - remove version from Enlightenment DE name strings (mga#19341) -- cgit v1.2.1