summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfigurator.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-09-27 20:52:11 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-09-27 20:52:11 +0000
commitf902492a01c974283c9c800ddbd5de651c474c25 (patch)
tree4a8eb59f4644fb18ef8e3a448c79061643b60145 /perl-install/Xconfigurator.pm
parent73e7a0f1107be369f7304335082afac4f96ee3d2 (diff)
downloaddrakx-f902492a01c974283c9c800ddbd5de651c474c25.tar
drakx-f902492a01c974283c9c800ddbd5de651c474c25.tar.gz
drakx-f902492a01c974283c9c800ddbd5de651c474c25.tar.bz2
drakx-f902492a01c974283c9c800ddbd5de651c474c25.tar.xz
drakx-f902492a01c974283c9c800ddbd5de651c474c25.zip
no_comment
Diffstat (limited to 'perl-install/Xconfigurator.pm')
-rw-r--r--perl-install/Xconfigurator.pm27
1 files changed, 23 insertions, 4 deletions
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index 049a10d4e..ffb966628 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -263,13 +263,32 @@ sub testFinalConfig($;$) {
unlink "$prefix/tmp/.X9-lock";
- my $pid; unless ($pid = fork) {
+ my $f_err = "$prefix/tmp/Xoutput";
+ my $pid;
+ unless ($pid = fork) {
+ open STDERR, ">$f_err";
my @l = "X";
@l = ($o->{card}{prog}, "-xf86config", $tmpconfig) if $::testing;
chroot $prefix if $prefix;
- exec @l, ":9" or exit 1;
+ exec @l, ":9" or exit 'true';
+ }
+ do { sleep 1 } until c::Xtest(":9") || waitpid($pid, c::WNOHANG());
+
+ my $b = before_leaving { unlink $f_err };
+
+ local *F; open F, $f_err;
+ while (<F>) {
+ if (/^Fatal server error/) {
+ my @msg; while (<F>) {
+ /^$/ and last;
+ push @msg, $_;
+ }
+ $in->ask_warn('', [ _("An error occurred:"), " ",
+ @msg,
+ _("\ntry changing some parameters") ]);
+ return 0;
+ }
}
- do { sleep 1; } until (c::Xtest(':0'));
#- create a link from the non-prefixed /tmp/.X11-unix/X9 to the prefixed one
#- that way, you can talk to :9 without doing a chroot
@@ -285,7 +304,7 @@ sub testFinalConfig($;$) {
$ENV{DISPLAY} = ":9";
gtkset_mousecursor(68);
- gtkset_background(200, 210, 210);
+ gtkset_background(200 * 256, 210 * 256, 210 * 256);
my ($h, $w) = Gtk::Gdk::Window->new_foreign(Gtk::Gdk->ROOT_WINDOW)->get_size;
$my_gtk::force_position = [ $w / 3, $h / 2.4 ];
$my_gtk::force_focus = 1;