[ https://issues.apache.org/jira/browse/GUACAMOLE-1196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17907219#comment-17907219 ]
Nick Couchman commented on GUACAMOLE-1196: ------------------------------------------ Actually, I think I've now figured it out. Just took reading the actual RFB specification [1] to find out what I was missing: {quote} SetDesktopSize Requests a change of desktop size. This message is an extension and may only be sent if the client has previously received an ExtendedDesktopSize rectangle. This message also enables clients to handle configuration of a multi head screen layout within the framebuffer extents, as described in Screen Model. {quote} So, we need to verify that the ExtendedDesktopSize message has been received first. And, it turns out, that libvncclient actually handles this automatically, and it is related to the presence and configuration of the client->screen data structure [2]. Basically, when libvncclient receives the rfbEncodingExtDesktopSize message, it configures the screen client->screen data structure [3]. This means that, if libvncclient doesn't contain support for the screen data structure, or that isn't initialized, we can't send the SetDesktopSize message. This has a couple of implications to the way we've implemented things: * Turns out that SendDesktopSize is actually fine and not broken, so we should just use it rather than sending it ourselves. * Sending the initial size is going to be slightly trickier than before, because we have to wait for the server to send the initial frame buffer update and screen configuration, which may actually happen after it enters the loop. 1 - https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#7410setdesktopsize 2 - https://github.com/LibVNC/libvncserver/blob/0640ba52c08c7cbbc98951cd405fdb746c0597f9/src/libvncclient/rfbclient.c#L1701-L1735 3 - https://github.com/LibVNC/libvncserver/blob/0640ba52c08c7cbbc98951cd405fdb746c0597f9/src/libvncclient/rfbclient.c#L2148C28-L2181 > Add auto resize to VNC sessions > ------------------------------- > > Key: GUACAMOLE-1196 > URL: https://issues.apache.org/jira/browse/GUACAMOLE-1196 > Project: Guacamole > Issue Type: Improvement > Components: Documentation, VNC > Reporter: Markus Bonet > Assignee: Nick Couchman > Priority: Minor > Fix For: 1.6.0 > > > As discussed on the mailing list: > {quote} > I'm running a TigerVNC session on the server where Guacamole is installed. If > I connect with the TigerVNC viewer there is this nice feature that the remote > desktop is automatically resized if the viewer window is resized, like this > if offered with RDP already. > Is there a configuration how to achieve this with a Guacamole session as well > for my VNC connection? > {quote} > Historically, this could not be done without corresponding support within > libvncclient. This should now be possible through handling the required > message type ({{SetDesktopSize}}): > {quote} > Unfortunately my team had to come up with a home baked solution for this > about 2 years ago. But it involved hacking up libvnc. > BUT, I think it is feasible to submit a feature request for it because now > libvnc recently tagged a new version that includes the message type that > guacamole needs to do this: > Tag: https://github.com/LibVNC/libvncserver/releases/tag/LibVNCServer-0.9.13 > New message: > https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#setdesktopsize > {quote} > See: > [http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/Auto-resize-of-VNC-sessions-td9511.html] -- This message was sent by Atlassian Jira (v8.20.10#820010)