# German keyboard layout



## Helmut (Jan 31, 2022)

Hi,

in /etc/login.conf I added


```
german|German Users Accounts:\
    :charset=ISO-8859-15:\
    :lang=de_DE.ISO8859-15:\
    :tc=default:
```

and then ran


```
sudo cap_mkdb /etc/login.conf
```

/etc.rc.conf has


```
keymap="de"
```

After that I did


```
sudo pw user mod helmut -L german
```


```
[helmut@BSDHelmut ~]$ sudo grep helmut /etc/master.passwd
helmut:*:1001:1001:german:0:0:Helmut:/home/helmut:/usr/local/bin/bash
[helmut@BSDHelmut ~]$
```

Then reboot. But german umlauts are still not displayed. What did I miss?


```
[helmut@BSDHelmut ~]$ uname -a
FreeBSD BSDHelmut 12.2-RELEASE-p10 FreeBSD 12.2-RELEASE-p10 12803d8a9(releng/12.2) GENERIC-PF-ALTQ  amd64
[helmut@BSDHelmut ~]$
```

Thank you!


----------



## eternal_noob (Jan 31, 2022)

Try a to use a ~/.login_conf in your user’s home directory with the following contents

```
me:\
    :charset=UTF-8:\
    :setenv=LC_ALL=de_DE.UTF-8:\
    :lang=de_DE.UTF-8:
```

(Note the filename has an underscore, not a dot.)

And don't forget to run

```
cap_mkdb ~/.login_conf
```

If you use Xorg add this to .xinitrc:

```
setxkbmap de -variant nodeadkeys -model pc105
```

Edit: Adding users to language groups is totally new to me, never needed this.


----------



## T-Daemon (Jan 31, 2022)

If you want that system wide in 12.2 :

/etc/rc.conf:

```
keymap="de"
```

Add in /etc/login.conf  (choose login class for user):

```
default:\
    ...
    :umask=022:\
    :charset=UTF-8:\
    :lang=C.UTF-8:

or for "german" login class:

german|German Users Accounts:\
    :charset=UTF-8:\
    :lang=C.UTF-8:\
    :tc=default:
```
Run `cap_mkdb /etc/login.conf`, log out, log in, get umlauts in console.

For Xorg create /usr/local/etc/X11/xorg.conf.d/keyboard.conf:

```
Section "Input Class"
        Identifier      "All Keyboards"
        MatchIsKeyboard "yes"
        Option "XkbLayout" "de"
EndSection
```


----------



## bsduck (Jan 31, 2022)

Helmut said:


> But german umlauts are still not displayed.


Not displayed where? At the login prompt? From your user shell when logged in? Inside a graphical session?



eternal_noob said:


> Edit: Adding users to language groups is totally new to me, never needed this.


Never used it either, but I'm aware Russian spies are hidden somewhere in my system because they already set this up for themselves:

```
russian|Russian Users Accounts:\
        :charset=UTF-8:\
        :lang=ru_RU.UTF-8:\
        :tc=default:
```


----------



## Helmut (Feb 1, 2022)

T-Daemon said:


> ```
> :charset=UTF-8:\
> :lang=C.UTF-8:\
> :tc=default:
> ```



UTF-8 did the trick. Thank you!


----------



## zirias@ (Feb 1, 2022)

It _should_ work with iso-8859-1/iso-8859-15 as well. But I wouldn't invest any time into that: those 8bit encodings are obsoleted by Unicode, most *nix systems nowadays use the UTF-8 representation of Unicode.

One important reason you should do the same is filenames. A Unix filename is just an array of octets (it doesn't have any encoding-information attached). So, if you created a file with some characters outside US-ASCII (7bit) in its name using e.g. an iso-8859-* encoding and try to display the filename using UTF-8, it will be broken.


----------

