Skip to content

us keyboard layout forced by skel dconf profile and workaround for fr (and other non-us) layouts #344

@melodie11

Description

@melodie11

When installing AnduinOS with a non-English ISO, the keyboard layout is still set to us at first login because /etc/skel/.config/dconf/user hardcodes:

[org/gnome/desktop/input-sources]
mru-sources=[('xkb', 'us')]
sources=[('xkb', 'us'), ('xkb', 'fr')]

This file is copied to every new user profile at creation and overrides any system-wide dconf policy or gschema override.

Two issues identified:
/etc/vconsole.conf is a symlink to /etc/default/keyboard which contains no FONT= directive — causing unreadable characters (Unicode boxes) both during boot and shutdown when systemd displays service names.

The skel dconf profile forces us as primary layout regardless of the installed ISO language.

Workarounds which have worked:

For issue 1, in the chroot, I replaced the symlink with a real file:

rm -f /etc/vconsole.conf
cat > /etc/vconsole.conf <<'EOF'
FONT=Lat15-Terminus16
KEYMAP=fr
EOF

For issue 2, I created a script and an autostart entry to correct the dconf profile at first graphical login:

cat > /usr/local/bin/fix-keyboard.sh <<'EOF'
#!/bin/bash
dconf write /org/gnome/desktop/input-sources/sources "[('xkb', 'fr')]"
dconf write /org/gnome/desktop/input-sources/mru-sources "[('xkb', 'fr')]"
chmod -x /usr/local/bin/fix-keyboard.sh
EOF

chmod +x /usr/local/bin/fix-keyboard.sh
cat > /etc/xdg/autostart/fix-keyboard.desktop <<'EOF'
[Desktop Entry]
Type=Application
Name=Fix Keyboard Layout
Exec=/usr/local/bin/fix-keyboard.sh
X-GNOME-Autostart-enabled=true
EOF

A suggestion for a wide-system fix :
the skel dconf profile should either not hardcode sources and mru-sources, or provide per-locale variants. A system-wide dconf policy via /etc/dconf/db/ could be another solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions