You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by LuKaRo <li...@lrose.de> on 2021/01/12 14:02:45 UTC

VNC Screen resizing?

Hi everyone,

one of my users has a Linux dual-monitor setup and only wants to stream
a single monitor via Guacamole. I was about to recommend him to use
"vncserver" instead of "x0vncserver" on his machine as the former will
automatically adapt to the browser window size instead of streaming the
fixed resolution of his physical monitors.

But then I first tried myself and I noticed it does not automatically
adapt to the browser window. However, when I use vncviewer from the
tigervnc-package, it does. In the FAQ
(http://guacamole.apache.org/faq/#resize-vnc) it says, VNC does not
support setting the screen size from the client, but in the observed
behaviour of vncviewer, it does. How is that possible?

And is it possible to have VNC somehow automatically adapt to the
browser window size? Or is the only option to set a resolution manually
on the server that comes as close as possible to the actual resolution
of the browser window?

Thanks a lot in advance!


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org


Re: VNC Screen resizing?

Posted by Nick Couchman <vn...@apache.org>.
(Adding the mailing list back to this thread...)

On Tue, Jan 12, 2021 at 11:37 AM Nick Couchman <vn...@apache.org> wrote:

> On Tue, Jan 12, 2021 at 11:21 AM LuKaRo <li...@lrose.de> wrote:
>
>> On 1/12/21 4:43 PM, Nick Couchman wrote:
>>
>> Correct, the VNC protocol, natively, does not support screen resizing.
>> However, VNC is a reasonably extensible protocol, and several vendors have
>> figured out ways to make this work with overlays to VNC.
>>
>> Thanks a lot. So this probably only worked because I used both the
>> tigerVNC client and server and they probably have a custom method for
>> handling this?
>>
>
Correct - TigerVNC, RealVNC, etc., have implemented this within their own
products, so if you're using their client with their server, it'll work.


>
>
>>
>> It is possible, and there is a JIRA issue opened for it:
>>
>> https://issues.apache.org/jira/browse/GUACAMOLE-1196
>>
>> So, it's just a matter of figuring out how to speak to various VNC
>> servers to trigger the resize, and implementing the checks and instructions
>> required for it.
>>
>> -Nick
>>
>> That probably means that for now, the best solution appears to be to set
>> the screen size manually using xrandr to a guess of what the browser's
>> interior screen size might be?
>>
> Yes, probably so. You can use some javascript to get the dimensions of the
browser window so that you don't have to guess - window.innerWidth and
window.innerHeight should do the trick, assuming the browser window is
sized where you expect to use it with Guacamole.

-Nick

Re: VNC Screen resizing?

Posted by Nick Couchman <vn...@apache.org>.
On Tue, Jan 12, 2021 at 9:03 AM LuKaRo <li...@lrose.de> wrote:

> Hi everyone,
>
> one of my users has a Linux dual-monitor setup and only wants to stream
> a single monitor via Guacamole. I was about to recommend him to use
> "vncserver" instead of "x0vncserver" on his machine as the former will
> automatically adapt to the browser window size instead of streaming the
> fixed resolution of his physical monitors.
>
> But then I first tried myself and I noticed it does not automatically
> adapt to the browser window. However, when I use vncviewer from the
> tigervnc-package, it does. In the FAQ
> (http://guacamole.apache.org/faq/#resize-vnc) it says, VNC does not
> support setting the screen size from the client, but in the observed
> behaviour of vncviewer, it does. How is that possible?
>
>
Correct, the VNC protocol, natively, does not support screen resizing.
However, VNC is a reasonably extensible protocol, and several vendors have
figured out ways to make this work with overlays to VNC.


> And is it possible to have VNC somehow automatically adapt to the
> browser window size? Or is the only option to set a resolution manually
> on the server that comes as close as possible to the actual resolution
> of the browser window?
>
>
It is possible, and there is a JIRA issue opened for it:

https://issues.apache.org/jira/browse/GUACAMOLE-1196

So, it's just a matter of figuring out how to speak to various VNC servers
to trigger the resize, and implementing the checks and instructions
required for it.

-Nick

Re: VNC Screen resizing?

Posted by Nick Couchman <vn...@apache.org>.
On Tue, Jan 12, 2021 at 9:39 PM sciUser <sh...@securitycentric.net>
wrote:

> You can control the VNC resolution via server side if your connection is
> Linux, when starting the OS you can specify the geometry of the vnc server
> and Guacamole does obey it.
> Example: using the gtf 1920 1080 60  You have Width 1920 and Height 1080
> refresh rate 60. Generally this is in the etc/X11/ config files to specify
> these parameters.
>
>
I think the request is not to have Guacamole "obey" the server-side
resolution, but the other way around - have the VNC server resolution
dynamically update based on the client (browser) resolution and screen area.


> Other solution is create a react client to control it.
>
>
>
I'm not sure I understand what a React client has to do with this?
Guacamole is already capable, in its current state, of 1) determining
browser area/resolution, 2) sending that information on to guacd, and 3)
signalling certain protocols to update screen size based on that
information. This is automatically performed in the case of Kubernetes,
RDP, SSH, and Telnet at connection time (and dynamically during a
connection for certain RDP versions). The only one lacking is VNC, and that
has nothing to do with Guacamole's inability to collect and pass that
information on, but with the lack of at least documented or standardized
support within the VNC protocol for performing this operation. As mentioned
previously in the thread, several VNC products (RealVNC and TigerVNC, in
particular) have come up with ways to implement this within the extensible
nature of the protocol, and such a feature could be added to Guacamole, as
well (guacd, in the VNC protocol source code).

-Nick

Re: VNC Screen resizing?

Posted by sciUser <sh...@securitycentric.net>.
You can control the VNC resolution via server side if your connection is
Linux, when starting the OS you can specify the geometry of the vnc server
and Guacamole does obey it. 
Example: using the gtf 1920 1080 60  You have Width 1920 and Height 1080
refresh rate 60. Generally this is in the etc/X11/ config files to specify
these parameters. 

Other solution is create a react client to control it. 





-----
A Cybersecurity Enablement Company 
We don't just run you through the motions, Our labs teach you how to think! 
Known good Guacamole  installations

--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org