UltraVNC icon indicating copy to clipboard operation
UltraVNC copied to clipboard

Scale to window improvement and CLI option

Open StefanKoell opened this issue 2 years ago • 9 comments

Hi!

in the configuration dialog there's a checkbox "Scale to window": image

I was wondering if there's a CLI option to enable this when starting vncviewer.exe and if not, if this can be implemented.

Also, it would be helpful if this option would preserve the aspect ratio of the screen.

A little background: vncviewer.exe tends to change and enforce the window size when the view is scaled. I have an app which "embeds" the VNC viewer window and hosts multiple VNC sessions in a tabbed interface (similar to what SuperPuTTY does). This seems to be the only "mode" which allows the user to freely resize the VNC viewer window.

Thanks, Stefan

StefanKoell avatar May 27 '22 09:05 StefanKoell

/autoscaling

You should also read the command line parameters page at: https://uvnc.com/docs/uvnc-viewer/52-ultravnc-viewer-commandline-parameters.html

Tki2000 avatar Jun 07 '22 12:06 Tki2000

Hi @Tki2000

I tried that before I posted here. The /autoscaling switch does not have the same effect as checking "Scale to window". When I open the connection settings, I get this: CleanShot 2022-06-07 at 14 53 36@2x

StefanKoell avatar Jun 07 '22 12:06 StefanKoell

Try -notoolbar -fullscreen. That worked for me to get the result that I was hoping for. Only thing is, you need to bring toolbar back when needed.

DaSigma avatar Jul 01 '22 01:07 DaSigma

@DaSigma I tried that but the results are not what I want/need. First issue is that the scaling is fixed to 100% and the second issue is that at the top of the screen the fullscreen toolbar slides in.

It seems that it's currently impossible to specify the desired setting through command line args or vnc configuration file. I'm wondering if someone could make this happen in a future version. This would be very helpful for my users.

Thanks, Stefan

StefanKoell avatar Jul 01 '22 06:07 StefanKoell

@RudiDeVos: Can you look?

Neustradamus avatar Oct 11 '22 20:10 Neustradamus

I think you want to use something like this This give you a window without borders, no toolbar and no status window In this case we also controle where it open. The content is sized to fit the window

vncviewer.exe a.b.c.d -position 300 200 1200 800 -noborder -directx -notoolbar -nostatus

RudiDeVos avatar Sep 15 '23 18:09 RudiDeVos

@StefanKoell, @Tki2000, @DaSigma: Please read the latest @RudiDeVos edited comment. What do you think?

Neustradamus avatar Sep 15 '23 21:09 Neustradamus

@Neustradamus @RudiDeVos I just tried your suggestion but it's not really what I was looking for. I can specify position and size only at startup and once I embedded the window, it basically forces to my parent window to the specified size.

Any chance to just expose the setting mentioned in the original post?

StefanKoell avatar Sep 18 '23 06:09 StefanKoell

That's -directx= scale to window

RudiDeVos avatar Sep 18 '23 06:09 RudiDeVos

@RudiDeVos thanks! That actually answers my original question and is exactly what I was looking for. I'm quite happy with the results.

Out of curiosity: is there a (cli) option to keep the aspect ration in combination with that setting?

StefanKoell avatar Sep 18 '23 07:09 StefanKoell