Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

I'm using ubuntu-vm-builder to create disk image on-the-fly. I want to use a script to change user keyboard on first login with --firstlogin argument with the following script :

# Running reconfigure of console-data to change keyboard layout
sudo dpkg-reconfigure console-data
sudo dpkg-reconfigure keyboard-configuration

When I attempt my first login, ubuntu ask me for my root password without displaying ncurses to change keyboard layout and return directly to the bash prompt.

Any idea of how can I have interactive keyboard layout change display ?

Regards, Thibault.

share|improve this question
This may be due to a long-standing bug where the script is never run. – Dennis Williamson Apr 28 '15 at 6:49

Since you are using sudo, you will need the root password. What's the problem with that?

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.