summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/Xconfigurator.pm7
-rw-r--r--perl-install/any.pm5
2 files changed, 9 insertions, 3 deletions
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index 975fb0cf3..c6d166523 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -1110,7 +1110,8 @@ Would you like X to start when you reboot?"), 1);
my %l; @l{@etc_pass_fields} = split ':';
$l{uid} > 500, $l{name};
} cat_("$o->{prefix}/etc/passwd");
- my @wm = run_program::rooted($prefix, "/usr/sbin/chksession", "-l");
+ my $cmd = $prefix ? "chroot $prefix" : "";
+ my @wm = map { lc } (split (' ', `$cmd /usr/sbin/chksession -l`));
my $flag='no';
unless (exists $o->{miscellaneous}{autologuser} || $::auto || !@users || $o->{authentication}{NIS}) {
$in->ask_from_entries_refH(_("Autologin"),
@@ -1118,7 +1119,9 @@ _("I can set up your computer to automatically log on one user.
If you don't want to use this feature, click on the cancel button."),
[ _("Choose the default user:") => { val => \$o->{miscellaneous}{autologuser}, list => \@users, not_edit => 1},
_("Choose the window_manager to run:") => { val => \$o->{miscellaneous}{autologwm}, list => \@wm, not_edit => 1}, ])
- ? do { $flag='yes'; $::isStandalone ? system("urpmi --auto autologin") : $o->pkgs_install("autologin"); } : delete $o->{miscellaneaous}{autologuser};
+ ? do { $flag='yes';
+ $::isStandalone ? system("urpmi --auto autologin") : $o->pkgs_install("autologin");
+ } : delete $o->{miscellaneaous}{autologuser};
}
any::setAutologin($prefix, $o->{miscellaneous}{autologuser}, $o->{miscellaneous}{autologwm}, "/usr/X11R6/bin/startx", $flag);
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 132e72831..dbe72b38e 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -241,11 +241,14 @@ sub setAutologin {
my $t1 = "USER=";
my $t2 = "EXEC=";
my $t3 = "AUTOLOGIN=";
+ $wm=uc($wm);
substInFile { s/^(\Q$t1\E|\Q$t2\E|\Q$t3\E).*\n//; $_ .= "$t1$user\n$t2$exe\n$t3=$flag" if eof } $f;
`chmod 644 $f`;
local *F;
open F, ">$prefix/etc/sysconfig/desktop" or die "Can't open $!";
- print F "$wm";
+ print F <<END;
+$wm
+END
}