guacamole-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "McRoy, Jeffrey (GE Healthcare)" <Jeffrey.Mc...@ge.com>
Subject Re: Working with pipes
Date Wed, 21 Feb 2018 14:48:27 GMT
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 <mike.jumper@guac-dev.org>
Reply-To: "user@guacamole.apache.org" <user@guacamole.apache.org>
Date: Tuesday, February 20, 2018 at 9:33 PM
To: "user@guacamole.apache.org" <user@guacamole.apache.org>
Subject: EXT: Re: Working with pipes

 

On Tue, Feb 20, 2018 at 7:23 PM, Nick Couchman <vnick@apache.org> 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

 


Mime
View raw message