Permanently change keyboard layout

5,765

Yes edit /etc/default/keyboard to set the global settings or ~/.dmrc for per-user settings.

Example /etc/default/keyboard:

 XKBMODEL="pc105"
 XKBLAYOUT="fr,us"
 XKBVARIANT="oss"
 XKBOPTIONS="compose:ralt,terminate:ctrl_alt_bksp"

Example ~/.dmrc:

 [Desktop]
 Language=de_DE.UTF-8   # change to your default lang
 Layout=de   nodeadkeys # change to your keyboard layout

In either case, will need to also run:

 sudo udevadm trigger --subsystem-match=input --action=change
Share:
5,765

Related videos on Youtube

user17738
Author by

user17738

Updated on September 18, 2022

Comments

  • user17738
    user17738 almost 2 years

    I am using Xmonad and LXDE, so I don't want to use gnome-settings-daemon. But there is a problem - without it I cannot switch into or type in Cyrillics. I found some temporary solution - when I enter sudo dpkg-reconfigure keyboard-configuration and click through config menu, I end with right layout. But after I reboot system it disappears and I am forced to reconfigure it again. Is there a way to make this changes permanent?

  • Maxim Brazhnikov
    Maxim Brazhnikov about 10 years
    Can you explain what the last step does in detail and why one needs it?