From user-return-4422-archive-asf-public=cust-asf.ponee.io@guacamole.apache.org Mon Aug 27 20:54:38 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id BB8FE180674 for ; Mon, 27 Aug 2018 20:54:37 +0200 (CEST) Received: (qmail 37301 invoked by uid 500); 27 Aug 2018 18:54:36 -0000 Mailing-List: contact user-help@guacamole.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@guacamole.apache.org Delivered-To: mailing list user@guacamole.apache.org Received: (qmail 37290 invoked by uid 99); 27 Aug 2018 18:54:36 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 27 Aug 2018 18:54:36 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 61FBAC9464 for ; Mon, 27 Aug 2018 18:54:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.447 X-Spam-Level: *** X-Spam-Status: No, score=3.447 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.164, HTML_MESSAGE=2, NUMERIC_HTTP_ADDR=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=guac-dev-org.20150623.gappssmtp.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id w6Cnan1Al785 for ; Mon, 27 Aug 2018 18:54:34 +0000 (UTC) Received: from mail-oi0-f50.google.com (mail-oi0-f50.google.com [209.85.218.50]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id A17275F4EC for ; Mon, 27 Aug 2018 18:54:33 +0000 (UTC) Received: by mail-oi0-f50.google.com with SMTP id x197-v6so4003oix.5 for ; Mon, 27 Aug 2018 11:54:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=guac-dev-org.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=10He/WmX7V0A+6zafmfkPJG5tnisAJO4RZwVSKy0dw4=; b=rDCIV0QNv2/jK69gMqcN2CHq5nsbKJDTmnWqZA6QYTrwD4I9ao3aGvmFhhcr13P1PY QPlZ3yqV8n787bajK1iIFXyOG2Mup0RvfaN4WciU1yQxgs0z++BqH7pfvkz7U8w5H84V NdzI7JecVB5OIfIw/Z8vs36RIChGYGCN9IhqK6bDHFwkE8co934pwYowMaB7zH+acg3G TR5mJjWaW+NtP1JQf9UkqoHk3fIjnl3rGa+/G6SnkMvHrECHMfWBKs4nCpLgLGjZnpvw f6YTsB6B95lfZsK8ii6e3sXeOXmdviWf3d2IMWpicdCWjmoGyy2qvl6BjYPBgWSWSLVV 0eXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=10He/WmX7V0A+6zafmfkPJG5tnisAJO4RZwVSKy0dw4=; b=PCoVNnkljh2H/2t0LaCPw/hf53P3/uAdOYSGsIqhzzyw1oSXgiPRLsN5+U56seoKR9 TJhxGewA1ueZgWxo9V9F6lrcjKDOoB/BK1UwuY37jpiGRcbMQXOEvVR2/BmdWJz/HPnh xsldeG9TgsSzuJNysN063FsjysxPPMzz13baD37A4DTs8rgZbEd8xAK1kD6AB+yG132+ gJ2o8KLSp7wGbYW+ZIhEFFVyMeHVIWK6uvvKsMi9FcFXT9bpFmzlIil4UIWAIYKCw7sL DzKHkumBZ53lVK0yua3+ekAdUlghP3evUYk8qwm6+f6nqRg5kkb9igMFAg9tCxJ+/4Rt 2Qnw== X-Gm-Message-State: APzg51CxEqpccPqfrXznuL41rtOMMGuHwsWEZM+L4sgOBg7YNq3VGJ+i Ep7UJlwer8sGJAqkh0tfKDh9JY4Tgs5VAwZAWglLLPWz X-Google-Smtp-Source: ANB0VdYFaHwrPBWBnqAVwsfOtifxRXGC4z1O33LO6QAudWpuFyoQC2lbewidY/q14+kKTsPGdxPQCpnwdk+6wsrfS1U= X-Received: by 2002:aca:4914:: with SMTP id w20-v6mr14481645oia.5.1535396071969; Mon, 27 Aug 2018 11:54:31 -0700 (PDT) MIME-Version: 1.0 Sender: mike.jumper@guac-dev.org Received: by 2002:ac9:34ec:0:0:0:0:0 with HTTP; Mon, 27 Aug 2018 11:53:51 -0700 (PDT) X-Originating-IP: [157.130.212.6] In-Reply-To: <1535367159472-0.post@n4.nabble.com> References: <1535367159472-0.post@n4.nabble.com> From: Mike Jumper Date: Mon, 27 Aug 2018 11:53:51 -0700 X-Google-Sender-Auth: pHr2IwVqQDoTcMCXoskQZdoDyVY Message-ID: Subject: Re: Scaling strategy for RDP on Retina and other 2x screen To: user@guacamole.apache.org Content-Type: multipart/alternative; boundary="00000000000075a8f305746f414d" --00000000000075a8f305746f414d Content-Type: text/plain; charset="UTF-8" On Mon, Aug 27, 2018 at 3:52 AM, Cathy Huang 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. > > 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 --00000000000075a8f305746f414d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On M= on, 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 w= ould be better to use the latest version.


I have a resolution problem when opening an RDP-connection on Retina screen= .

```
function getConnectionString (token) {
=C2=A0 var pixel_density =3D window.devicePixelRatio || 1;
=C2=A0 var optimal_dpi =3D pixel_density * 96;
=C2=A0 var optimal_width =3D window.innerWidth * pixel_density; // on retin= a screen
it's twice the width of window.innerWidth
=C2=A0 var optimal_height =3D window.innerHeight * pixel_density;
=C2=A0 return ("token=3D" + token
=C2=A0 =C2=A0 + "&width=3D"=C2=A0 =C2=A0 =C2=A0 =C2=A0+ Math.= floor(optimal_width)
=C2=A0 =C2=A0 + "&height=3D"=C2=A0 =C2=A0 =C2=A0 + Math.floor= (optimal_height)
=C2=A0 =C2=A0 + "&dpi=3D"=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0+ = Math.floor(optimal_dpi)

...

client.connect(getConnectionString(token))

```


I can't speak to the correctness o= f "guacamole-lite". Based on what you're describing, the most= likely explanation is that the DPI value is not being forwarded through th= e tunnel to guacd during the initial connection. Lacking DPI information, t= he 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<= br> 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.236338= 8.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 th= e
image before sending to the browser? Or did I miss something when I set up<= br> 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 a= nd things work as expected, but things do not work when using a third-party= library like "guacamole-lite", that fairly definitively demonstr= ates that the issue is within that library. You may wish to reach out to th= e author of that library to try to get things corrected.

- Mike

--00000000000075a8f305746f414d--