From f902492a01c974283c9c800ddbd5de651c474c25 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 27 Sep 1999 20:52:11 +0000 Subject: no_comment --- perl-install/Xconfigurator.pm | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'perl-install/Xconfigurator.pm') 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 () { + if (/^Fatal server error/) { + my @msg; while () { + /^$/ 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; -- cgit v1.2.1