guacamole-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Jumper <mike.jum...@glyptodon.org>
Subject Re: Scaling strategy for RDP on Retina and other 2x screen
Date Mon, 27 Aug 2018 18:53:51 GMT
On Mon, Aug 27, 2018 at 3:52 AM, Cathy Huang <lu_huang1@163.com> wrote:

> Hi.
> I am building a remote desktop application based on guacamole-common-js and
> guacamole-lite(a nodejs-based guacamole-common implementation). The version
> of guacamole is 0.9.13-incubating.
>

It would be better to use the latest version.


> I have a resolution problem when opening an RDP-connection on Retina
> screen.
>
> ```
> function getConnectionString (token) {
>   var pixel_density = window.devicePixelRatio || 1;
>   var optimal_dpi = pixel_density * 96;
>   var optimal_width = window.innerWidth * pixel_density; // on retina
> screen
> it's twice the width of window.innerWidth
>   var optimal_height = window.innerHeight * pixel_density;
>   return ("token=" + token
>     + "&width="       + Math.floor(optimal_width)
>     + "&height="      + Math.floor(optimal_height)
>     + "&dpi="         + Math.floor(optimal_dpi)
>
> ...
>
> client.connect(getConnectionString(token))
>
> ```
>
>
I can't speak to the correctness of "guacamole-lite". Based on what you're
describing, the most likely explanation is that the DPI value is not being
forwarded through the tunnel to guacd during the initial connection.
Lacking DPI information, the RDP support will assume 96 DPI and things will
be tiny.


> However I found that the official demo is fine on Retina screen. I checked
> the canvas' width in chrome dev-tool. It neither equals to
> `window.innerWidth * pixel_density` nor `window.innerWidth`. As shown
> below.
>
> <http://apache-guacamole-general-user-mailing-list.
> 2363388.n4.nabble.com/file/t706/t01d84d55d86d97306a.png>
>
> PS: I didn't resize the window at all.
>
> Does the official demo's server implementation do anything to resize the
> image before sending to the browser? Or did I miss something when I set up
> the connection? How can I get the same effect as the official demo do?
>

There is no such official demo. We (Apache Guacamole) do not host a demo.
What are you referring to?

If you have tried deploying Apache Guacamole exactly as released and things
work as expected, but things do not work when using a third-party library
like "guacamole-lite", that fairly definitively demonstrates that the issue
is within that library. You may wish to reach out to the author of that
library to try to get things corrected.

- Mike

Mime
View raw message