in reply to Net::SSH::Perl and remote xterm
use strict; use warnings; $SIG{CHLD} = "IGNORE"; my $pid = fork(); die "can not fork" if !defined $pid; if ($pid == 0) { # in child process my $cmd = "/usr/openwin/bin/xterm -display <IPADDRESS:X.Y>"; my $ssh = Net::SSH::Perl->new(<HOSTNAME>, port => 22); my $ssh->login(<USERNAME>, <PASSWORD>) my($out, $err) = $ssh->cmd($cmd); exit(0); } # in parent process # carry on doing other things...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Net::SSH::Perl and remote xterm
by flyingmoose (Priest) on Jan 09, 2004 at 15:10 UTC |