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

This question already has an answer here:

At our site we generally prefer the key to the left of the "A" to be Control, and we don't need a Caps Lock key.

On existing configurations we use 'Option "XkbOptions" "ctrl:nocaps"' to get this behaviour in X, which is usually good enough for us.

On Ubuntu 12.04 we have found this not to work. In addition to this, we have tried editing /etc/default/keyboard to contain 'XKBOPTIONS="ctrl:nocaps"'. This didn't appear to have an effect.

We have observed that when an individual user configures this behaviour through System Settings, ~/.gconf/desktop/gnome/peripherals/keyboard/kbd/%gconf.xml appears to record the configuration. However, even for admin users, we haven't located the "Apply For All Users" (or similar) option in the config application.

We would like to make Caps Lock act as a Control key by default for our users.

The most important requirements are that it works in X sessions started by GDM, and that individual users still have a way to override the setting for their own account.

Ideally, but less importantly, we would also favour solutions that work in all X sessions (not just those started by GDM), and also on the console.

share|improve this question

migrated from Jul 5 '12 at 10:02

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Jorge Castro, Basharat Sialvi, Eric Carvalho, Radu Rădeanu, aquaherd Jul 28 '13 at 8:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Try setting the gconf value under /etc/gconf/gconf.xml.defaults/. If you drop packages to manage settings, you can alternatively put a file under /var/lib/gconf/defaults/.

share|improve this answer
Thanks. To spell out explicitly how I did what you suggested, I ran gconf-editor, found the relevant setting, right-clicked the setting as an admin and chose "Set as Default". – projix Jul 5 '12 at 11:20
projix or @andrew, can you be even more explicit? I'm not following. Thanks. – sage Sep 14 '12 at 8:05

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