summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2018-11-04 14:52:58 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2018-11-04 21:26:19 +0000
commit2b7939fa62a89129c5a86e2acc85a20a459f8ff8 (patch)
treeb511e1e08b1c9fe382f1ac4cb975a5c913a02ae2 /perl-install/any.pm
parent924042fea828994a5ec3937a81bcd1ffd0f72b69 (diff)
downloaddrakx-2b7939fa62a89129c5a86e2acc85a20a459f8ff8.tar
drakx-2b7939fa62a89129c5a86e2acc85a20a459f8ff8.tar.gz
drakx-2b7939fa62a89129c5a86e2acc85a20a459f8ff8.tar.bz2
drakx-2b7939fa62a89129c5a86e2acc85a20a459f8ff8.tar.xz
drakx-2b7939fa62a89129c5a86e2acc85a20a459f8ff8.zip
Adapt drakdm and set_autologin for display-manager service, not prefdm (mga#22593)
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm11
1 files changed, 3 insertions, 8 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 13229965e..b12b9785f 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -770,15 +770,9 @@ sub get_autologin() {
xfce4 => 'lightdm',
LXDE => 'lxdm',
);
- my %dm_canonical = (
- gnome => 'gdm',
- plasma => 'sddm',
- );
my $dm =
- lc($desktop{DISPLAYMANAGER}) ||
- $desktop_to_dm{$desktop} ||
- basename(chomp_(run_program::rooted_get_stdout($::prefix, "/etc/X11/lookupdm")));
- $dm = $dm_canonical{$dm} if exists $dm_canonical{$dm};
+ basename(readlink("$::prefix/etc/systemd/system/display-manager.service")) =~ s/(.*)\.service/$1/r ||
+ $desktop_to_dm{$desktop};
my $autologin_user;
if ($dm eq "gdm") {
@@ -872,6 +866,7 @@ sub set_autologin {
$desktop{DESKTOP} = $autologin->{desktop};
$desktop{DISPLAYMANAGER} = $autologin->{dm};
setVarsInSh($sys_conffile, \%desktop);
+ symlinkf("/usr/lib/systemd/system/$autologin->{dm}.service", "$::prefix/etc/systemd/system/display-manager.service");
if ($autologin->{user}) {
my $home = (getpwnam($autologin->{user}))[7];