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 trying to remap my CapsLock key to Ctrl key as described here (adding /usr/bin/setxkbmap -option "ctrl:nocaps" command to "Session and Startup"->"Application Autostart").

But this doesn't work in Xubuntu 12.04.

When I'm running the same command (/usr/bin/setxkbmap -option "ctrl:nocaps") from terminal everything works as expected. If I change command to: sh -c "/usr/bin/setxkbmap -option \"ctrl:nocaps\"" it again works if I'm running it from terminal, but it doesn't work if I add it to xfce "Session and Startup" configurator. Also when I create a script like this:

/usr/bin/setxkbmap -option "ctrl:nocaps"

and add it to startup via "Session and startup" configurator, it has no effect at all. But if I run this script after login it actually remaps caps key as expected.

share|improve this question
up vote 2 down vote accepted

OK, my problem was because of xfce4-xkb-plugin. It was resetting xkb settings each time. I just installed xxkb instead of it, and now everything works absolutely fine!

share|improve this answer
Please mark your answer as accepted! That way the question is closed and people know the solution works :) – izx Jul 1 '12 at 9:29

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.