Bug 37551 - VNC uses English keyboard layout by default
VNC uses English keyboard layout by default
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Virtualization - UVMM
UCS 4.0
All Linux
: P5 normal (vote)
: UCS 4.0-1-errata
Assigned To: Andreas Peichert
Philipp Hahn
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-01-14 19:58 CET by Philipp Hahn
Modified: 2015-04-16 10:51 CEST (History)
4 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): External feedback, Usability
Max CVSS v3 score:


Attachments
use locale_default for locale_keymap (654 bytes, patch)
2015-03-04 13:35 CET, Andreas Peichert
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2015-01-14 19:58:26 CET
Setting up a new VM always uses the English-American Layout by default.
This is caused by the Debian-installer no longer setting locale/keymap, which is used by 44univention-virtual-machine-manager-daemon.inst:

$ grep -n -i -A2 -B2 locale.keymap 44univention-virtual-machine-manager-daemon.inst
75-
76-# determin keyboard layout
77:while [ -n "$locale_keymap" ]
78-do
79-     for virttech in kvm qemu
80-     do
81:             if [ -e "/usr/share/${virttech}/keymaps/${locale_keymap}" ]
82-             then
83-                     break 2
84-             fi
85-     done
86:     if [[ "${locale_keymap}" = *[^a-z][a-z]* ]]
87-     then
88:             locale_keymap="${locale_keymap%[^a-z][a-z]*}"
89-     else
90:             locale_keymap=
91-     fi
92-done
93:: ${locale_keymap:=en-us}
94-
95-create_hvm_profile() {
--
122-            --set rtcoffset="$rtcoffset" \
123-            --set vnc=1 \
124:            --set kblayout="${locale_keymap}" \
125-            --set pvdisk="$pvdisk" \
126-            --set pvcdrom="$pvcdrom" \

Ticket #2014112821000255
Comment 1 Andreas Peichert univentionstaff 2015-03-04 13:35:56 CET
Created attachment 6744 [details]
use locale_default for locale_keymap

By using locale_default with lowercase and replaced underscore by hyphen, the "determin keyboard layout" part will run until an available keymap is found:

de_DE.UTF-8:UTF-8 --> de
fr_BE.UTF-8 --> fr-be
foo --> en-us
Comment 2 Michael Grandjean univentionstaff 2015-04-03 13:40:21 CEST
This was also noticed during a technical training last week and a UCS@school workshop this week.

Although I mentioned to check the keyboard layout, the majority of attendees overlooked the setting (or ignored my advice) and ended up with a US Layout when accessing their VMs via VNC.
Comment 3 Andreas Peichert univentionstaff 2015-04-13 16:37:37 CEST
Package: univention-virtual-machine-manager-daemon
Version: 4.0.24-9.600.201504131629
Branch: ucs_4.0-0
Scope: errata4.0-1

r59738 Fix default keyboard layout of profiles in join script.
r59739 YAML
Comment 4 Philipp Hahn univentionstaff 2015-04-15 12:23:14 CEST
OK: r59738
OK: r59739
OK: aptitude install '?source-package(univention-virtual-machine-manager-daemon)~i'
OK:
 ucr get locale/default # en_US.UTF-8:UTF-8
 udm uvmm/profile list | grep kblayout # en-us
OK:
 ucr get locale/default # de_DE.UTF-8:UTF-8
 udm uvmm/profile list | grep kblayout # de-de
OK:
 ucr get locale/default # zh_CN.UTF-8:UTF-8
 udm uvmm/profile list | grep kblayout # en-us

OK: 2015-03-29-univention-virtual-machine-manager-daemon.yaml
OK: errata-announce -V 2015-03-29-univention-virtual-machine-manager-daemon.yaml
Comment 5 Janek Walkenhorst univentionstaff 2015-04-16 10:51:53 CEST
<http://errata.univention.de/ucs/4.0/147.html>