diff options
author | Nicolas Salguero <nicolas.salguero@laposte.net> | 2016-08-13 02:58:42 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-08-13 02:59:39 +0200 |
commit | 11ae13b95669baae4bff3364bcd53a3dd05a75a8 (patch) | |
tree | a50d58a196ff131909c806fff0daafbb18366985 | |
parent | 8f9a14c783f0c60b66e11a46fcbb22c1b1311d3a (diff) | |
download | drakx-11ae13b95669baae4bff3364bcd53a3dd05a75a8.tar drakx-11ae13b95669baae4bff3364bcd53a3dd05a75a8.tar.gz drakx-11ae13b95669baae4bff3364bcd53a3dd05a75a8.tar.bz2 drakx-11ae13b95669baae4bff3364bcd53a3dd05a75a8.tar.xz drakx-11ae13b95669baae4bff3364bcd53a3dd05a75a8.zip |
add support for LXDM (mga#17616)
need desktop-common-data-6.2+
perl_checker cleanups by Thierry Vignaud
-rw-r--r-- | perl-install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/any.pm | 26 | ||||
-rw-r--r-- | perl-install/install/NEWS | 1 |
3 files changed, 26 insertions, 2 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index 049d36860..1019e9afe 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,4 +1,5 @@ - drakautologin: + o add support for LXDM (mga#17616) o add support for SDDM (mga#17913) - drakedm: o translate SDDM instead of KDM diff --git a/perl-install/any.pm b/perl-install/any.pm index 1cf6d3841..e809ed7af 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -680,6 +680,7 @@ sub get_autologin() { my $gdm_file = "$::prefix/etc/X11/gdm/custom.conf"; my $sddm_file = "$::prefix/etc/sddm.conf"; my $lightdm_conffile = "$::prefix/etc/lightdm/lightdm.conf.d/50-mageia-autologin.conf"; + my $lxdm_conffile = "$::prefix/etc/lxdm/lxdm.conf"; my $autologin_file = "$::prefix/etc/sysconfig/autologin"; my $desktop = $desktop{DESKTOP} || first(sessions()); my %desktop_to_dm = ( @@ -708,6 +709,10 @@ sub get_autologin() { } elsif ($dm eq "lightdm") { my %conf = read_gnomekderc($lightdm_conffile, 'Seat:*'); $autologin_user = text2bool($conf{'#dummy-autologin'}) && $conf{"autologin-user"}; + } elsif ($dm eq "lxdm") { + my %conf = read_gnomekderc($lxdm_conffile, 'base'); + $autologin_user = $conf{autologin}; + $autologin_user =~ s/^.//; } else { my %conf = getVarsFromSh($autologin_file); $autologin_user = text2bool($conf{AUTOLOGIN}) && $conf{USER}; @@ -718,7 +723,7 @@ sub get_autologin() { sub is_standalone_autologin_needed { my ($dm) = @_; - return member($dm, qw(lxdm slim xdm)); + return member($dm, qw(slim xdm)); } sub set_autologin { @@ -755,8 +760,25 @@ sub set_autologin { 'autologin-user' => $autologin->{user} )) } if -e $lightdm_conffile; + #- Configure LXDM + my $lxdm_conffile = "$::prefix/etc/lxdm/lxdm.conf"; + eval { update_gnomekderc($lxdm_conffile, 'base' => ( + if_($autologin->{user}, 'autologin' => '@' . $autologin->{user}) + )); + if ($autologin->{user} && $autologin->{desktop} && !member($autologin->{desktop}, qw(default failsafe))) { + my $xsession_file = find { + my %xsession = read_gnomekderc($_, 'Desktop Entry'); + $xsession{Name} eq $autologin->{desktop}; + } glob("$::prefix/usr/share/xsessions/*.desktop"); + $xsession_file =~ s!\.[^.]+$!!; + $xsession_file =~ s!.*/!!; + $xsession_file ||= $autologin->{desktop}; + update_gnomekderc($lxdm_conffile, $autologin->{user} => ( + 'user' => $autologin->{user}, + 'session' => $xsession_file, + )) } } if -e $lxdm_conffile; + my $xdm_autologin_cfg = "$::prefix/etc/sysconfig/autologin"; - # TODO: configure lxdm in /etx/lxdm/lxdm.conf if (is_standalone_autologin_needed($autologin->{dm})) { setVarsInShMode($xdm_autologin_cfg, 0644, { USER => $autologin->{user}, AUTOLOGIN => bool2yesno($autologin->{user}), EXEC => '/usr/bin/startx.autologin' }); diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 911423dba..6733efbce 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,4 +1,5 @@ - autologin/desktop configuration (shared code): + o add support for LXDM (mga#17616) o add support for SDDM (mga#17913) Version 17.53 - 31 July 2016 |