1 #!/usr/local/bin/perl -s
6 $xskip = ( $^O eq 'solaris' ) ? 600 : 500 ;
10 use File::Basename qw( basename );
11 $ENV{PATH} .= ':' . basename( $0 ) . ':.';
12 for my $prog qw( run_stem xterm telnet ) {
13 die "Can't find $prog in PATH\n" if
14 system( "which $prog >/dev/null 2>&1" ) != 0;
19 $SIG{ 'INT' } = \&cleanup ;
24 $prompt = '-prompt Stem:' ;
25 $prompt2 = '-prompt Chat:' ;
26 $echo = 'console_echo=1'
29 foreach $cmd ( split /\n/, <<EOT ) {
30 xterm -T Chat -n Chat -geometry 80x40+XSKIP+0 -e $ssfe $prompt run_stem $echo chat
31 xterm -T A -n A -geometry 80xLINE+0+OFF -e $ssfe $prompt2 telnet localhost 6666
32 xterm -T B -n B -geometry 80xLINE+0+OFF -e $ssfe $prompt2 telnet localhost 6667
33 xterm -T C -n C -geometry 80xLINE+0+OFF -e $ssfe $prompt2 telnet localhost 6668
34 xterm -T D -n D -geometry 80xLINE+0+OFF -e $ssfe $prompt2 telnet localhost 6669
37 $cmd =~ s/XSKIP/$xskip/ ;
39 $cmd =~ s/LINE/$line_cnt/ ;
40 $cmd =~ s/OFF/$base_off/ and $base_off += $offset ;
44 @cmd = split ' ', $cmd ;
49 sleep 4 unless $cmd =~ /localhost/ ;
73 if ( $pid = fork() ) {
75 push @children, $pid ;