A work-around to actually setting the keyboard layout (to Norwegian):

d-i preseed/late_command                            string \
 in-target /bin/sed -i "s/XKBMODEL=\"[a-z]*\"/XKBMODEL=\"pc105\"/g" 
/etc/default/keyboard ; \
 in-target /bin/sed -i "s/XKBLAYOUT=\"[a-z]*\"/XKBLAYOUT=\"no\"/g" 
/etc/default/keyboard ; \
 in-target /bin/sed -i "s/XKBVARIANT=\"[a-z]*\"/XKBVARIANT=\"\"/g" 
/etc/default/keyboard ; \
 in-target /bin/sed -i "s/XKBOPTIONS=\"[a-z]*\"/XKBOPTIONS=\"\"/g" 
/etc/default/keyboard ; \
 in-target /usr/sbin/dpkg-reconfigure -fnoninteractive keyboard-configuration ; 
\
 in-target /usr/sbin/update-locale LC_TIME=en_GB.UTF-8 LC_MESSAGES=POSIX

Note, that "/usr/sbin/dpkg-reconfigure -fnoninteractive keyboard-
configuration" is necessary to get the new layout configured for X11 as
well. Although the documentation says that editing /etc/default/keyboard
is fine, X11 will not use the new layout unless "/usr/sbin/dpkg-
reconfigure keyboard-configuration" is run.

Finally, "/usr/sbin/update-locale LC_TIME=en_GB.UTF-8" is used to get a
24-hour clock with an en_IE.UTF-8 locale (metric, €, etc., but AM/PM
clock). (A European English locale "en_EU.UTF-8" would be a nice
feature.)

Needless to say that this work-around is really ugly, and the installer
should be fixed to automatically set the proper keyboard layout.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1553147

Title:
  xenial preseed cannot set keyboard layout

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/console-setup/+bug/1553147/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to