[pgh-pm] Wanted in browser ssh client.

Malcolm Nooning m.nooning at comcast.net
Tue Jan 30 14:02:39 PST 2007


Hello Barrie,

I don't know IPC::Run, or XUL, but the idea of running an app, 
connecting to stding, stdout, stderr connected to pipes is fairly 
straightforward.  Without knowing more about your needs I can only throw 
something out there and see if it meets any.

I have seen your name come up in conjunction with PAR emails.  The code 
snippets I am pasting originate from 
PAR-Packer-0.970\contrib\automated_pp_test\pipe_a_command.pm.

If this is not the sort of thing you are looking for you will of course 
just ignore this.  If it looks like something you can use, well, I am 
the author of all of the code in the automated_pp_test directory so if 
you have any questions feel free to email me.

  #################################################################
  # Open up a log file to hold the data.  Then send the $cmd to
  # a pipe.  Capture the stdout and stderr of the pipe and
  # print it to the log file.
  #################################################################
  if (!(open (PIPE_LOGFILE, ">$log_file"))){
       ... error code
  }


  if (!(open (CMD_STDOUT_AND_STDERR, "$cmd 2>&1 |"))){
      ... error code
  }

  # Take in any STDOUT and STDERR that "cmd" might cause
  while ($stdline = <CMD_STDOUT_AND_STDERR>) {
      print PIPE_LOGFILE $stdline;
      if ($verbose) {
        print $stdline;
      }
  }

  # Close before copying it to force an output flush.
  close(PIPE_LOGFILE);
  close(CMD_STDOUT_AND_STDERR);




Barrie Slaymaker wrote:
> Along these lines, is anyone aware of something like IPC::Run (i.e. run 
> an app, connect stdin, stdout, stderr connected to pipes?) or Expect 
> available in Firefox (XUL is fine)?
>
> It seems like a missing link for XUL apps, and I've considered 
> crossbreeding one of the pure perl httpds with IPC::Run and using the 
> "local webserver + browser" approach to writing an app that does this, 
> but that's icky-but-pragmatic.
>
> I'm sort of thinking of something like the old Mozilla XMLShell (Note: 
> this is not the newer Perl xml editing shell), except without the burden 
> posed by XML.
>
> - Barrie
>
> _______________________________________________
> pgh-pm mailing list
> pgh-pm at pm.org
> http://mail.pm.org/mailman/listinfo/pgh-pm
>
>   


More information about the pgh-pm mailing list