noVNC - defaulting to "local scaling" possible?

holr

Well-Known Member
Jan 4, 2019
33
1
48
54
Hello,
I would like to change the default noVNC setting for scaling mode from "off" to "local scaling", such that whenever any VM is opened, it will automatically scale to the window. Is this possible please?
 
This is already the default for me. Which version are you using (pveversion -v)?
 
This is already the default for me. Which version are you using (pveversion -v)?

Hello Dominic,
Thanks for replying, pveversion -v provides me with:
Code:
proxmox-ve: 5.4-1 (running kernel: 4.15.18-16-pve)
pve-manager: 5.4-7 (running version: 5.4-7/fc10404a)
pve-kernel-4.15: 5.4-4
pve-kernel-4.15.18-16-pve: 4.15.18-41
pve-kernel-4.15.18-12-pve: 4.15.18-36
ceph: 12.2.12-pve1
corosync: 2.4.4-pve1
criu: 2.11.1-1~bpo90
glusterfs-client: 3.8.8-1
ksm-control-daemon: 1.2-2
libjs-extjs: 6.0.1-2
libpve-access-control: 5.1-10
libpve-apiclient-perl: 2.0-5
libpve-common-perl: 5.0-52
libpve-guest-common-perl: 2.0-20
libpve-http-server-perl: 2.0-13
libpve-storage-perl: 5.0-43
libqb0: 1.0.3-1~bpo9
lvm2: 2.02.168-pve6
lxc-pve: 3.1.0-3
lxcfs: 3.0.3-pve1
novnc-pve: 1.0.0-3
proxmox-widget-toolkit: 1.0-28
pve-cluster: 5.0-37
pve-container: 2.0-39
pve-docs: 5.4-2
pve-edk2-firmware: 1.20190312-1
pve-firewall: 3.0-22
pve-firmware: 2.0-6
pve-ha-manager: 2.0-9
pve-i18n: 1.1-4
pve-libspice-server1: 0.14.1-2
pve-qemu-kvm: 3.0.1-4
pve-xtermjs: 3.12.0-1
qemu-server: 5.0-53
smartmontools: 6.5+svn4324-1
spiceterm: 3.0-5
vncterm: 1.5-3
zfsutils-linux: 0.7.13-pve1~bpo2
 
Are we talking about
  1. the embedded console in the content panel that opens when you click on the "Console" button on the left side or
  2. about the new window that opens when you click the button on the top right?
If 1: This is strange as the default definitely is Local Scaling.
If 2: We simply had a misunderstanding and your installation is working as intended.

Independently of your answer, the defaults are hardcoded. If you want to change it you'll have to search the file /usr/share/pve-manager/js/pvemanagerlib.js on the host for the string
Code:
resize: '
It appears twice, once with the value 'scale' and once with the value 'off'. Each of them controls one of the two cases. Change them according to your needs.

I encourage you to file an enhancement request at https://bugzilla.proxmox.com/ if you want your change to be shipped as default.
 
  • Like
Reactions: holr
Hi Dominic,
Thank you very much for the information! My case was 2. Sorry for not making that clearer! I made an amendment to the /usr/share/pve-manager/js/pvemanagerlib.js as per your recommendation and rebooted the server; after clearing my local history on my web browser, the behaviour changed to "local scaling". Thank you very much!
 
  • Like
Reactions: Dominic
holr:
Thank you for requesting clarification on how to set default Scaling Mode on noVNC to Local Scaling. Now I have to stop myself from immediately clicking the settings gear>Scaling Mode option after every noVNC popup!!!

Dominic:
Thank you for passing this along. This has saved at least a couple users numerous clicks per day.

My exact steps:
Code:
cd /usr/share/pve-manager/js/
cp pvemanagerlib.js pvemanagerlib.js.bak
nano pvemanagerlib.js
^w, resize: 'off',
    # Change resize: 'off', to resize: 'scale',
Now when clicking the ">_ Console" button from within the PVE WebUI, scaling is default for the noVNC popup!
For those launching noVNC console regularly from within PVE WebUI, this is a definite convenience.
 
  • Like
Reactions: utkonos and Dominic
not working with version 6
Code:
proxmox-ve: 6.0-2 (running kernel: 5.0.21-5-pve)
pve-manager: 6.0-15 (running version: 6.0-15/52b91481)
pve-kernel-helper: 6.0-12
pve-kernel-5.0: 6.0-11
pve-kernel-4.15: 5.4-8
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!