Mageia Bugzilla – Attachment 7543 Details for
Bug 17913
Autologin configuration in MCC does not work (with SDDM and XDM at least)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
A patch to correctly set the "Session" entry of $HOME/.dmrc
drakxtools-17.19-set-dot-dmrc.patch (text/plain), 1.08 KB, created by
Nicolas Salguero
on 2016-03-10 11:29:09 CET
(
hide
)
Description:
A patch to correctly set the "Session" entry of $HOME/.dmrc
Filename:
MIME Type:
Creator:
Nicolas Salguero
Created:
2016-03-10 11:29:09 CET
Size:
1.08 KB
patch
obsolete
>diff -ruN drakxtools-17.19.orig/perl-install/any.pm drakxtools-17.19/perl-install/any.pm >--- drakxtools-17.19.orig/perl-install/any.pm 2016-03-10 11:16:59.073525811 +0100 >+++ drakxtools-17.19/perl-install/any.pm 2016-03-10 11:19:05.794108285 +0100 >@@ -815,7 +815,20 @@ > > #- for KDM/GDM > my $wm_number = sessions_with_order()->{$wm} || ''; >- update_gnomekderc("$p_home/.dmrc", 'Desktop', Session => "$wm_number$wm"); >+ my $xsessions_dir = "$::prefix/usr/share/xsessions"; >+ my $xsession_file = $wm; >+ if (opendir (DIR, $xsessions_dir)) { >+ while (my $xsessions_file = readdir(DIR)) { >+ next if ($xsessions_file =~ m/^\./); >+ my %xsession = read_gnomekderc($xsessions_dir . '/' . $xsessions_file, 'Desktop Entry'); >+ if ($xsession{"Name"} eq $wm) { >+ $xsession_file = $xsessions_file; >+ $xsession_file =~ s{\.[^.]+$}{}; >+ last; >+ } >+ } >+ } >+ update_gnomekderc("$p_home/.dmrc", 'Desktop', Session => "$xsession_file"); > my $user = find { $home eq $_->[7] } list_passwd(); > chown($user->[2], $user->[3], "$p_home/.dmrc"); > chmod(0644, "$p_home/.dmrc");
diff -ruN drakxtools-17.19.orig/perl-install/any.pm drakxtools-17.19/perl-install/any.pm --- drakxtools-17.19.orig/perl-install/any.pm 2016-03-10 11:16:59.073525811 +0100 +++ drakxtools-17.19/perl-install/any.pm 2016-03-10 11:19:05.794108285 +0100 @@ -815,7 +815,20 @@ #- for KDM/GDM my $wm_number = sessions_with_order()->{$wm} || ''; - update_gnomekderc("$p_home/.dmrc", 'Desktop', Session => "$wm_number$wm"); + my $xsessions_dir = "$::prefix/usr/share/xsessions"; + my $xsession_file = $wm; + if (opendir (DIR, $xsessions_dir)) { + while (my $xsessions_file = readdir(DIR)) { + next if ($xsessions_file =~ m/^\./); + my %xsession = read_gnomekderc($xsessions_dir . '/' . $xsessions_file, 'Desktop Entry'); + if ($xsession{"Name"} eq $wm) { + $xsession_file = $xsessions_file; + $xsession_file =~ s{\.[^.]+$}{}; + last; + } + } + } + update_gnomekderc("$p_home/.dmrc", 'Desktop', Session => "$xsession_file"); my $user = find { $home eq $_->[7] } list_passwd(); chown($user->[2], $user->[3], "$p_home/.dmrc"); chmod(0644, "$p_home/.dmrc");
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 17913
:
7531
|
7540
| 7543