On Tue, Nov 28, 2023 at 9:11 PM Pierre Bastola <[email protected]>
wrote:

> I have an application that uses WebSockets to display a remote VM (that
> streams over xrdp).  Even though the guacd server connects completely to
> the xrdp server, Chrome only displays a cursor over a black screen.
>
> Only when you hover over something or press a key down and receive a
> changed state, does chrome show the screen. I have validated this by
> manually sending key states and mouse states when the connection is made.
> Example:
>
> guac.onstatechange = (state) => {
> if (state == 3) {
> setTimeout(() => {
> // @ts-ignore
> guac.sendMouseState({
> "x": 9,
> "y": 9,
> "left": false,
> "middle": false,
> "right": false,
> "up": false,
> "down": false
> })
> guac.sendKeyEvent(1, 97);
> guac.sendKeyEvent(1, 65288);
> dispatchClickEvent(divWithCanvas, 0)
> }, 1000)
> }
> And this will make the screen load because the coordinates x=9 and y = 9
> has something hoverable.
>
> I am looking for a permanent fix to this. Can someone help?
>
>
It's a bit difficult to know what's going on without seeing a substantially
larger amount of your code. It sounds to me like your client application is
not requesting or accepting or processing the initial copy of the display,
and doesn't really do anything with it until there's a change on the remote
side (due to keyboard or mouse movement), which triggers an update to the
screen image which then gets sent and the client finally displays it.

I'd encourage you to go through the Guacamole Client code and take a look
at what it's doing to process the initial screen state upon connection, and
make sure your code is doing something similar. Other than that, you're
likely going to have to post more detailed information in order for anyone
to actually be able to help you.

-Nick

>

Reply via email to