If the Guac server is opening a pipe stream and redirecting output to it, 
wouldn’t the onpipe event fire in the Guac client?

 

guacClient.onpipe = function(input_stream, mimetype, name) {

                reader = new Guacamole.StringReader(input_stream);

                reader.ontext = function receiveText(text) {

                                console.log(text);

                };

}

 

-Jeff

 

 

From: Mike Jumper <[email protected]>
Reply-To: "[email protected]" <[email protected]>
Date: Tuesday, February 20, 2018 at 9:33 PM
To: "[email protected]" <[email protected]>
Subject: EXT: Re: Working with pipes

 

On Tue, Feb 20, 2018 at 7:23 PM, Nick Couchman <[email protected]> wrote:

Is it possible for the client to access the terminal output at either the 
javascript or java layer?

 

 

So, one thing to keep in mind, here, is that the terminal output from SSH and 
Telnet is transmitted from guacd to the Guacamole Client as an image, not as 
text.  I know it doesn't *seem* like it, particularly since the client allows 
you to select text and copy it to the clipboard (and vice-versa), but if you 
look at the actual data going back and forth, all of the screen output, include 
"text" from the terminal, is image data.  So, doing anything with it (parsing, 
etc.) at the JavaScript layer is probably impractical, if not impossible.

 

Waaaaaait! Guacamole does send images, yes, but there is also an OSC which 
temporarily redirects output to a pipe stream:

 

https://github.com/apache/guacamole-server/blob/99e6f89eba56b6effc189d1c2c160686ed880beb/src/terminal/terminal_handlers.c#L1314-L1320

 

There is an example of this within guacctl:

 

https://github.com/apache/guacamole-server/blob/99e6f89eba56b6effc189d1c2c160686ed880beb/bin/guacctl#L285-L301

 

- Mike

 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to