17
6
Is it possible to change the resolution of the viewer specified during starting of the vnc server with the geometry command line argument? I have a vncserver configured for a wide screen monitor but I want to view it on a 1024x768 screen.
17
6
Is it possible to change the resolution of the viewer specified during starting of the vnc server with the geometry command line argument? I have a vncserver configured for a wide screen monitor but I want to view it on a 1024x768 screen.
10
The UltraVNC viewer supports auto scaling, so it will resize the viewing window automatically, to display the whole screen of the remote server.
Update
11
This same question was asked a while ago on stack overflow: https://stackoverflow.com/questions/15816/changing-the-resolution-of-a-vnc-session-in-linux
The accepted answer from Nathan Fellman:
Real VNC server 4.4 includes support for Xrandr, which allows resizing the VNC. Start the server with:
vncserver -geometry 1600x1200 -randr 1600x1200,1440x900,1024x768
Then resize with:
xrandr -s 1600x1200 xrandr -s 1440x900 xrandr -s 1024x768
With TigerVNC client you don't have to set any geometries on the server side. My server is run with no -randr
setting at all and just basic -geometry 1024x768
. This low resolution is used only when you first connect, but then you can change the resolution just by resizing the client window to anything you want, any crazy, non-standard, ad-hoc resolution you want. My setup: openSuse 15.1, GDM, KDE Plasma, TigerVNC client 1.9.0 (Windows) – Espinosa – 2019-09-22T21:55:16.427
3
If you need to change the setting without restarting VNC server, I had good results with:
vncconfig -set RandR="1024x768,1600x900"
and then using xrandr to change resolution as fgregg suggested:
xrandr -s 1024x768
xrandr -s 1600x900
1
With TigerVNC Windows VNC client (viewer) auto resolution works out of the box. No need to set anything anywhere, on the client or on the server. When you first connect to your server, the resolution is set to whatever is preset on the server side but you can easily change it just by resizing the client window; to any resolution, any crazy, non-standard, ad-hoc resolution you want. The remote desktop resolution, say KDE, follows your client window resolution smoothly.
Check that "Resize remote session to the local window" is set. It should be by default.
Please don't confuse auto resolution change with image stretching, alternatively called auto-scaling. This caling is virtually useless, unless you are visually impaired. It works like zoom or looking glass in popular bitmap editors. It just makes pixels bigger (or smaller) by stretching the output image. It decrease image quality significantly, if you stretch a lot.
What users typically want is real resolution change of the remote session. And that is what I talk about earlier and that is what TigetVNC client is capable, providing server has matching functionality. Auto-resolutioning keeps image sharp at any size. Downside is it also increases network bandwidth.
So far I found that only TigerVNC is capable of auto-resolutioning. I tested TightVNC (open source), RealVNC (free version) and UltraVNC (open source) and had no luck with any of them, they provide useless auto-scaling at the best.
TigerVNC homepage: https://tigervnc.org/
TigerVNC sources: https://github.com/TigerVNC/tigervnc
TigerVNC releases on GitHub: https://github.com/TigerVNC/tigervnc/releases
TigerVNC binaries to download: https://bintray.com/tigervnc/stable/tigervnc/1.9.0
If you want only viewer, then download only viewer, like vncviewer64-1.9.0.exe, that is just viewer without bundled VNC server. Beware that with TigerVNC server service starts automatically, silently, in the background, which I strongly detest as a possible security threat.
My server is run with no -randr
setting at all and just basic -geometry 1024x768
. This low resolution is used only when you first connect, but then you can change the resolution just by resizing the client window. If you are curious, here is my full VNC server command:
/usr/bin/Xvnc -log *:syslog:30,TcpSocket:syslog:-1 -inetd -MaxDisconnectionTime=5 -securitytypes=none -displayfd 10 -geometry 1024x768 -AllowOverride=Desktop,AcceptPointerEvents,SendCutText,AcceptCutText,MaxDisconnectionTime,MaxConnectionTime,MaxIdleTime,QueryConnect,QueryConnectTimeOut,AlwaysShared,NeverShared,DisconnectClients,SecurityTypes,Password,PlainUsers -query localhost -once -desktop New session -extension MIT-SHM
According to openSuse package description, xorg-x11-Xvnc
- the openSuse VNC server - is built on TigerVNC code. So in my case TigerVNC client talks to TigerVNC server, so perhaps that is why is is all so seamless :)
My client setup: TigerVNC client 1.9.0 (Windows)
My server setup: openSuse 15.1, xorg-x11-Xvnc 1.9.0, vncmanager 1.0.2, GDM, KDE Plasma.
0
For TightVNC, click on the gear icon (settings) and change your picture quality to "High" and it works nicely.
Why should picture quality be related to automatically screen resolution changing on the controlled part? – realtebo – 2018-07-15T06:46:15.947
It does not work for me. Just tested. This remote resolution driven size of client windows is supported by some VNC clients, like TigerVNC, but not TightVNC or RealVNC (free version). I've just tested it with RealVNC Viewer 6.19.715 and TightVNC Viewer for Windows 2.8.23. – Espinosa – 2019-09-22T22:03:30.307
0
I received an official reply writing to VNC customer service.
The short version is: no, you cannot change remote resolution to automatically match local vnc controller window / screen resolution.
They told me that is because RDP is a real login session, so the screen behaves as you are a common user in the controlled system.
VNC simply mirrors the screen. And it is not a bad thing because you cannot share RDP session but you can share VNC
I suggested to create a config on vnc server to allow the screen changing because I know that windows API allow third party sw to programmatically set screen resolution.
Then I will wait....
0
With TightVNC (at least) if the server (windows) changes screen resolution then the client automatically changes to match the new resolution.
Is it possible to have the RDP behaviour? When the controller connects to a controlled windows is, the controlled windows os change its resolution. Do not Scale, change resolution, to match controller screen resolution, at least on form ratio, than scale to fit. – realtebo – 2018-07-07T18:57:44.713
That would be interesting now sure if it's possible... – rogerdpack – 2018-07-09T14:57:19.783
I am using real vnc 4.1.3. where to find the desktop scaling option? I cannot find it. – Rohit Banga – 2010-09-04T12:56:15.273
It is not included in the RealVNC Free Edition, you need to by the Personal or Enterprise version. See the feature comparison http://www.realvnc.com/products/download.html
– stukelly – 2010-09-04T16:27:22.743I have downloaded the ultra vnc viewer. It works thanks. – Rohit Banga – 2010-09-05T05:47:44.190
2Not scaling, but resize, change controlled pc resolution automatically to match to controller screen. – realtebo – 2018-07-07T18:55:59.807
Beware: auto-scaling does not change remote desktop resolution, it just makes pixels bigger (or smaller) by stretching the output image. For most users auto scaling is virtually useless, unless you are visually impaired. It decrease image quality significantly. It works like zoom or looking glass in popular bitmap editors. What users really want is real resolution change of the remote session and so far only TigerVNC is capable to do so, from all of the free viewers. See my answer below. – Espinosa – 2019-09-22T23:06:27.123