[pve-devel] applied: [RFC qemu-server] stop passing default '-k' QEMU option from datacenter.cfg

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Mar 21 15:29:48 CET 2018


applied

On Tue, Mar 20, 2018 at 02:26:43PM +0100, Thomas Lamprecht wrote:
> Modern noVNC does not needs this anymore, actually things may get
> worse if it's used. E.g., when one sets 'de' and the VM locale is
> 'de' you may get a 'ĸ' (unicode kra) if you want to send an ampersand
> character through pressing SHIFT + 6.
> 
> Qemus manual pages confirms that this is most times not needed
> anymore:
> 
>  > -k language
>  >    Use keyboard layout language (for example "fr" for
>  >    French). This option is only needed where it is not
>  >    easy to get raw PC keycodes (e.g. on Macs, with some
>  >    X11 servers or with a VNC or curses display). You don't
>  >    normally need to use it on PC/Linux or PC/Windows
>  >    hosts.
>  -- man kvm
> 
> An user can always set it per VM, wew simply remove the implict
> default derived from the cluster wide datacenter.cfg
> 
> Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
> ---
>  PVE/QemuServer.pm | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 5462d07..47480a6 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -2573,9 +2573,6 @@ sub load_defaults {
>  	}
>      }
>  
> -    my $conf = PVE::Cluster::cfs_read_file('datacenter.cfg');
> -    $res->{keyboard} = $conf->{keyboard} if $conf->{keyboard};
> -
>      return $res;
>  }
>  
> @@ -3389,9 +3386,7 @@ sub config_to_command {
>      
>      push @$cmd, '-S' if $conf->{freeze};
>  
> -    # set keyboard layout
> -    my $kb = $conf->{keyboard} || $defaults->{keyboard};
> -    push @$cmd, '-k', $kb if $kb;
> +    push @$cmd, '-k', $conf->{keyboard} if defined($conf->{keyboard});
>  
>      # enable sound
>      #my $soundhw = $conf->{soundhw} || $defaults->{soundhw};
> -- 
> 2.14.2




More information about the pve-devel mailing list