guacamole-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Jumper <>
Subject Re: Guacamole only shows a screenshot when using importState
Date Fri, 15 Sep 2017 22:19:17 GMT
On Fri, Sep 15, 2017 at 1:47 PM, messido <> wrote:

> To cut it short, I'm using my own front end. One of my pages create the
> connection with guacamole, and when connection is established it uses
> "exportState" to save the state inside localStorage as a JSON string..
> So far so good, I get valid data.
> Now when I go to a different page and importState from local storage (after
> JSON parsing) I get almost like a snapshot of the host machine, I can see
> it
> but cant interact with anything.. pretty sure it's just a still image
> because the terminal cursor isn't flashing.. anyways here's my code
> ...
> Am I using the wrong functionality? Are importState and exportState meant
> to
> be like just a snapshot of that current moment? I'm looking for a way  to
> save the clients.. state... so i can move it around and start that same
> session from different computers
Yes and yes. ;)

importState() and exportState() deal with the instantaneous internal state
of a particular Guacamole.Client instance. They do not deal with the
continuous, ever-changing state of an active connection. For that, you need
to leverage the screen replication features built into the backend,
normally referred to as "screen sharing".

When a connection is created, guacd automatically allocates a unique
identifier for that connection, sending that identifier back during the
initial Guacamole protocol handshake:

This identifier can be automatically parsed and retrieved using
getConnectionID() of ConfiguredGuacamoleSocket:

For users which should see the same screen, you establish connections to
the same guacd exactly as for any other connection, except you pass in the
connection ID instead of a protocol using setConnectionID():

guacd will join the new connection to the existing connection,
automatically synchronizing state to the new client, and then replicating
incremental state changes across all users sharing that connection.

- Mike

View raw message