2

In order to switch to a new keyboard layout I have added an setxkbmap command to my Openbox's autostart.sh.

However, this only takes effect once I log in (when Openbox starts).

While logging in, in GDM (I suppose), the layout I chose when installing the system is still active - which is distracting in my efforts.

What do I have to do to have this default layout changed?

(OS: Debian 7.1)

5

Take a look at this Debian Wiki article. There are several approaches on that page probably the easiest is to run this command as root:

$ dpkg-reconfigure keyboard-configuration
| improve this answer | |
  • you mean # dpkg ... I think. – jcora Jun 28 '13 at 18:15
  • 1
    @jcora nope, the command dpkg-reconfigure is correct. – josch Aug 10 '18 at 7:51
0

The right way to do it, is already covered by the answer from sim, but in case you are unable do run dpkg-reconfigure for some reason (suppose you have a chroot or something), you have to edit /etc/default/keyboard. This is also what the dpkg-reconfigure command does in the end but in a safe way using an easy to use interface.

Here is an example /etc/default/keyboard for the German Neo2 keyboard layout:

XKBMODEL="pc105"
XKBLAYOUT="de"
XKBVARIANT="neo"
XKBOPTIONS="terminate:ctrl_alt_bksp"

BACKSPACE="guess"

Also, this will affect your initramfs. This is especially important if you configured full disk encryption where you have to type your password. To also immidiately update the initramfs you can run:

sudo update-initramfs -u
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.