Cover V07, I08
Article
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Listing 1
Listing 2

aug98.tar


Listing 2: Remote display script - ntXstart

#!/usr/local/bin/perl
#
#
$sockaddr_t = 'S n a4 x8';

sub inet_ntoa_sock {
local($addr) = @_;
local($pf,$port,$ip) = unpack($sockaddr_t,$addr);
local($a,$b,$c,$d) = unpack('C4',$ip);
return "$a.$b.$c.$d";
}

$hersockaddr = getpeername(STDIN) || do {
print "getpeername failed\n";
exit 1;
}

$ip = &inet_ntoa_sock($hersockaddr);

$ENV{'DISPLAY'}="$ip:0";
exec @ARGV;

# End of File