Re: Prevent VNC display from stretching?

2018-02-23 Thread amlamarra
Thanks for the help, Jeff! I modified three lines, the two scale ratios (I
changed to 0.01) and the "autoFit : true," line I changed to "autoFit :
false,". The scale ratio now adjusts by 1% at a time, as expected. However,
it looks like the window is still "autoFitting". Previously, I had set the
geometry of the VNC server to be close to my browser window. When I launch
the VNC session, it's at 101%. I can zoom in past 101% but I can't zoom out
below that, not without unmaximizing the window. When I make the browser
window smaller, I can zoom out to until it fits the window. It seems
Guacamole doesn't want to shrink the VNC display to less than the browser
window and add a black border around the top & bottom (like it does for the
left & right). Are there other values in that guacamole.js file that I
should be looking at? I'm no web developer so I had to do a bunch of google
searching just to figure out how to extract the .war file and re-minify the
js file.



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


Re: Prevent VNC display from stretching?

2018-02-22 Thread McRoy, Jeffrey (GE Healthcare)
Hi Andrew,

If you are using the stock Gaucamole client, you can modify the default 
behavior in the javascript to prevent autoFit at startup and set the zoom 
increments to whatever you want.

In guacamole.js you will find the below. Don't foget to re-minify the 
javascript into guacamole.min.js after you make changes.


Regards,
Jeff


/**
 * Whether the Guacamole display should be scaled to fit the browser
 * window.
 *
 * @type Boolean
 */
autoFit : true,

$scope.zoomIn = function zoomIn() {
$scope.menu.autoFit = false;
$scope.client.clientProperties.autoFit = false;
$scope.client.clientProperties.scale += 0.1;
};

$scope.zoomOut = function zoomOut() {
$scope.client.clientProperties.autoFit = false;
$scope.client.clientProperties.scale -= 0.1;
};

On 2/22/18, 7:24 AM, "amlamarra"  wrote:

I'd like to disable scaling in VNC. Right now, I'm able to get the scaling
set to 100% by doing the following:
Open the Guacamole menu (press Ctrl+Alt+Shift)
Uncheck "Automatically fit to browser window" under Display
Un-maxmize browser window
Check "Automatically fit to browser window"
Uncheck "Automatically fit to browser window"

Now I'm at 100%. And those zoom buttons don't work very well either. It only
goes in increments of 10%. And if you're at 109% and zoom out, then you're
set to 99%... It just seems kinda wonky. I wasn't sure if there was anything
I can do to set scaling to 100% no matter what.



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



smime.p7s
Description: S/MIME cryptographic signature


Re: Prevent VNC display from stretching?

2018-02-22 Thread amlamarra
I'd like to disable scaling in VNC. Right now, I'm able to get the scaling
set to 100% by doing the following:
Open the Guacamole menu (press Ctrl+Alt+Shift)
Uncheck "Automatically fit to browser window" under Display
Un-maxmize browser window
Check "Automatically fit to browser window"
Uncheck "Automatically fit to browser window"

Now I'm at 100%. And those zoom buttons don't work very well either. It only
goes in increments of 10%. And if you're at 109% and zoom out, then you're
set to 99%... It just seems kinda wonky. I wasn't sure if there was anything
I can do to set scaling to 100% no matter what.



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


Re: Prevent VNC display from stretching?

2018-02-22 Thread Nick Couchman
>
> - Get VNC to behave the way RDP does, where the resolution of the client
> is passed to the server at connection time and the remote display
> automatically sizes to the correct resolution specified by the client?
>
> I'm not certain how feasible the first option is in Guacamole; the second
> - getting VNC to dynamically pass resolution from client to server - is not
> possible, and is a limitation of the VNC protocol, not of Guacamole.  You
> can work around it using xrandr to add the client resolution and resize the
> VNC server display, but I don't know of a way to automate that process
> native to VNC.
>
>
Just one quick note of clarification, here - it looks like some VNC
client/server systems have implemented dynamic sizing support by extensions
the VNC (RFB, actually) protocol, but these extensions are very
product-specific and are not standardized across different pieces of
software.  So, supporting each of these implementations would be difficult,
and some of them would not be possible, for commercial products that do not
provide source code or documentation for their extensions.

-Nick


Re: Prevent VNC display from stretching?

2018-02-22 Thread Nick Couchman
On Wed, Feb 21, 2018 at 9:59 PM, amlamarra  wrote:

> Is there a way to get VNC connections from stretching (or shrinking) the
> display by default? I'd like to keep it at 100%.
>
>
It's not entirely clear what you mean, here:
- Disable "scaling" of the VNC display, such that the zoom remains at 100%
and you get scrollbars and/or a black border?
or
- Get VNC to behave the way RDP does, where the resolution of the client is
passed to the server at connection time and the remote display
automatically sizes to the correct resolution specified by the client?

I'm not certain how feasible the first option is in Guacamole; the second -
getting VNC to dynamically pass resolution from client to server - is not
possible, and is a limitation of the VNC protocol, not of Guacamole.  You
can work around it using xrandr to add the client resolution and resize the
VNC server display, but I don't know of a way to automate that process
native to VNC.

-Nick