setxkbmap -option "ctrl:nocaps"
It sets caps lock to ctrl, which is its most useful and reasonable binding. Useful especially in latest releases of most distributions, since newest Gnome control centre libraries remove the GUI to set the above (seriously, Gnome people, what’s with the constant removal of useful stuff, huh?).
@pkazmierczak Tip #2: put it in ~/.config/autostart/ctrlnocaps.desktop (or does .xsession or similar still work?)—
Anya Helene Bagge (@anyahelene) October 07, 2013
I guess whether
.xsession still works depends on what kind of desktop env you’re using, afaik it doesn’t work on GNOME/Unity. Also, Unity still has a UI where you can put “startup applications”, and these can be arbitrary commands.