How to remap CapsLock key to Ctrl in Xubuntu

Posted by Evgeny on Ask Ubuntu See other posts from Ask Ubuntu or by Evgeny
Published on 2012-06-30T22:34:33Z Indexed on 2012/07/01 3:23 UTC
Read the original article Hit count: 298

Filed under:

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:

#!/bin/sh
/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.

© Ask Ubuntu or respective owner

Related posts about xubuntu