in reply to Re^2: Perl/Tk + CSSH
in thread Perl/Tk + CSSH
That can be done with the xterm options.
See "xterm -h" for all the options. To execute cssh in that xterm, use the -e option, like " xterm -fn 10x20 -geometry '16x19+0+20' -e CSSH @CSSHOPTIONS "
#!/usr/bin/perl use warnings; use strict; use Tk; my $mw = tkinit; $mw->Button(-text=>"Xterm",-command=> [\&go])->pack; $mw->Button(-text=>"Xterm with attributes ", -command=>[\&go, q(-fn 10x20 -geometry '16x19+0+20')])->pac +k; MainLoop; sub go { print "@_\n"; my $xoptions = shift || ''; local $SIG{CHLD} = 'IGNORE'; # don't wait for child # exit status. avoids # zombies. die "fork failed: $!" unless defined(my $pid = fork); return if $pid; exec("xterm $xoptions"); warn "exec failed: $!"; CORE::exit(1); }
|
|---|