Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to script what dpkg-reconfigure keyboard-configuration actually do?

I always make the same selections, so it would be very nice, if I could do it without any user interaction.

share|improve this question
fyi: /var/lib/dpkg/info/keyboard-configuration.postinst – Michuelnik Sep 14 '12 at 15:08
up vote 4 down vote accepted

Seed your options with debconf and run DEBIAN_FRONTEND=noninteractive dpkg-reconfigure keyboard-configuration.

man debconf-set-selections(1):

       debconf-set-selections - insert new default values into the debconf database

        debconf-set-selections file
        debconf-get-selections | ssh newhost debconf-set-selections

This shows your current settings:

$ debconf-show keyboard-configuration
  keyboard-configuration/modelcode: pc105
  keyboard-configuration/unsupported_config_options: true
  keyboard-configuration/unsupported_config_layout: true
  keyboard-configuration/toggle: No toggling
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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