I have an Ubuntu Server 18.04 with more than 500 users (not simultaneous), and I can't set a global keyboard setting to all users for the GUI (running the default GNOME installation).
The physical machine has a Brazilian ABNT2 keyboard layout that appears to be configured correctly:
root@gilneas:/# cat /etc/default/keyboard
# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
XKBMODEL="pc105"
XKBLAYOUT="br"
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess"
root@gilneas:/# grep -v \# /etc/locale.gen
en_US.UTF-8 UTF-8
pt_BR.UTF-8 UTF-8
I tried running dpkg-reconfigure keyboard-configuration
and regenerated the locates with locale-gen --purge
. But nothing works, as GNOME does not honor the configurations and selects English (US) as the default keyboard.
This settings used to work on previous Ubuntu Server LTS versions: 12.04, 14.04 and 16.04; are all working accordingly. But not on 18.04.