summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2018-11-20 18:33:44 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2018-11-20 20:47:48 +0000
commitf6fb10dd51fff62d4ff274829f1b33a4cca68f0b (patch)
tree775ff3e14f4ade19165a7eaf8605366077396822
parent8e28fd495cf50d4b2e446f309004bec938b91d4f (diff)
downloaddrakx-f6fb10dd51fff62d4ff274829f1b33a4cca68f0b.tar
drakx-f6fb10dd51fff62d4ff274829f1b33a4cca68f0b.tar.gz
drakx-f6fb10dd51fff62d4ff274829f1b33a4cca68f0b.tar.bz2
drakx-f6fb10dd51fff62d4ff274829f1b33a4cca68f0b.tar.xz
drakx-f6fb10dd51fff62d4ff274829f1b33a4cca68f0b.zip
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.
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/any.pm12
-rw-r--r--perl-install/install/NEWS1
3 files changed, 13 insertions, 1 deletions
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)