On Wed, Mar 13, 2019 at 7:37 PM 若鸟 <ruoniao...@qq.com> wrote: > My English is so bad,you may find it difficult to read. > I coding with guacamole-ext and implement the example servlet from the > official manual.I am not set width and height but the dispaly form browser > don't auto suite my screen. >
As far as RDP is concerned, there are three sets of dimensions involved: 1) The "width" and "height" connection parameters. These values explicitly set the width and height in pixels. They are raw parameters without any implications about what these dimensions mean for the client. 2) The client's requested/desired/optimal width and height. These are part of the connection handshake and are used by the RDP implementation if "width" and "height" aren't given. The protocol implementation is allowed to adjust these values. 3) The dimensions of the client display in the browser. Unless you set otherwise through a call to scale(), the size of the client display will exactly match the remote display, with the remote display being set as described in #1 and #2 above. If you want your custom application to scale the display automatically, you will need to: 1) Forward the relevant dimensions to your tunnel implementation so that it can forward them to guacd during the connection handshake (using an instance of GuacamoleClientInformation): http://guacamole.apache.org/doc/guacamole-common/org/apache/guacamole/protocol/GuacamoleClientInformation.html#setOptimalScreenWidth-int- http://guacamole.apache.org/doc/guacamole-common/org/apache/guacamole/protocol/GuacamoleClientInformation.html#setOptimalScreenHeight-int- http://guacamole.apache.org/doc/guacamole-common/org/apache/guacamole/protocol/ConfiguredGuacamoleSocket.html#ConfiguredGuacamoleSocket-org.apache.guacamole.net.GuacamoleSocket-org.apache.guacamole.protocol.GuacamoleConfiguration-org.apache.guacamole.protocol.GuacamoleClientInformation- 2) When the display changes size on the client side (the "onresize" event) and when the browser is resized, recalculate the necessary scale and set it explicitly through a call to scale(): http://guacamole.apache.org/doc/guacamole-common-js/Guacamole.Display.html#event:onresize http://guacamole.apache.org/doc/guacamole-common-js/Guacamole.Display.html#scale - Mike