Skip to content

Get German keyboard with English user interface

Sven Putze edited this page Mar 5, 2020 · 4 revisions

To get an English UI with German keyboard, I followed the Void wiki and did:

  • Become root

    sudo su -
    
  • Edit /etc/default/libc-locales, uncomment the wanted locales in the system

    sed -i -e 's/^#de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/g' /etc/default/libc-locales
    sed -i -e 's/^#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g' /etc/default/libc-locales
    

    Of course you can use the editor of your choice in doing so.

  • Write /etc/locale.conf and set everything to German, except LANG and LC_MESSAGES

    cat << __EOF__ > /etc/locale.conf
    LANG="en_US.UTF-8"
    LC_CTYPE="de_DE.UTF-8"
    LC_NUMERIC="de_DE.UTF-8"
    LC_TIME="de_DE.UTF-8"
    LC_COLLATE=C
    LC_MONETARY="de_DE.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER="de_DE.UTF-8"
    LC_NAME="de_DE.UTF-8"
    LC_ADDRESS="de_DE.UTF-8"
    LC_TELEPHONE="de_DE.UTF-8"
    LC_MEASUREMENT="de_DE.UTF-8"
    LC_IDENTIFICATION="de_DE.UTF-8"
    LC_ALL=
    __EOF__
    
  • Rebuild locales

    xbps-reconfigure -f glibc-locales
    exit
    

Now, there are the Umlauts in qterm, xterm and the "real TTY" aka ALT+F2. This should probably work with other combinations of locales, too.

X11

Project trident uses as display manager and right now it only supports an us keyboard in the login screen.

  • To change that to a German keyboard, become root

    sudo su -
    
  • Insert a line in one of the sddm startup scripts

    grep --quiet setxkbmap /usr/share/sddm/scripts/Xsetup || echo 'setxkbmap de' >> /usr/share/sddm/scripts/Xsetup
    # validate
    cat /usr/share/sddm/scripts/Xsetup
    #!/bin/sh
    # Xsetup - run as root before the login dialog appears
    setxkbmap de
    
  • Reboot the machine.

Now you are greeted with a little German flag and keyboard layout.