Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Following up on modifying virtual consoles' keymaps, how can I edit /etc/default/console-setup?

Will the file be parsed on each boot (then cached in /etc/console-setup/cached.kmap.gz), or do I need to run a certain command after every manual change?

The description for package console-setup does give its basic purpose, but am I missing documentation on how to use it?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

setupcon is the program which is responsible for updating /etc/console-setup/cached.kmap.gz. setupcon is run on startup inside the initramfs image, so you'll need to update that before the changes apply

share|improve this answer
So, if I understand correctly, /etc/default/console-setup is checked each boot (or read from the cached file), but what I see in my FS isn't what is seen by setupcon when the initramfs image is still being used? –  Roger Pate Sep 22 '10 at 21:40
Actually, I think it's the opposite, console-setup requires an initramfs update but the cached keymap is always read. You need to test to verify :-) –  Johan Dahlin Sep 23 '10 at 0:09

The program setupcon uses the /etc/default/console-setup file. Setupcon has a man page that refers to a README file. The README file is /usr/share/doc/console-setup/README.gz. That file indicates that you need to invoke setupcon as part of the boot sequence to have the console parameters changed automatically.

Edit the /etc/default/console-setup file to suit your needs. You can verify that the settings do what you want by opening a terminal ctrl-alt-f1, logging in and running setupcon.

To make the changes happen automatically with each reboot, edit the file /etc/rc.local to add the line setupcon above the exit 0 line.

Both files, /etc/default/console-setup and /etc/rc.local require root privileges to edit.

share|improve this answer
So, does this happen automatically with "stock" Ubuntu 10.04? Does the console-setup package do it? How do I check? –  Roger Pate Sep 20 '10 at 22:07
I don't think it is automatic. Try adding /bin/setupcon to the startup applications (system/preferences/startup applictions). –  W_Whalley Sep 20 '10 at 22:18
That seems the wrong place, as it would run after logging into X rather than at boot time. –  Roger Pate Sep 21 '10 at 5:32
Right, I edited my answer to correct. –  W_Whalley Sep 22 '10 at 17:21

Your Answer


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