So I want to turn capslock into ctrl. From my google-fu the command to run is /usr/bin/setxkbmap -option "ctrl:nocaps" and it works when I run it at the terminal. But when I place it on 'Startup Appliacations' the command fails to take effect. Any idea why?
Asked
Active
Viewed 347 times
1
PuercoPop
- 143
- 6
-
1This is wrong way to set xkb settings anyway. The proper way is to use `xorg.conf`. (i.e. `Option "XKbOptions" "ctrl:nocaps"`.) – Sparhawk Apr 12 '14 at 11:46
-
possible duplicate of [Make setxkbmap preferences being set at startup](http://askubuntu.com/questions/410499/make-setxkbmap-preferences-being-set-at-startup) – Glutanimate Aug 23 '14 at 20:56
2 Answers
3
On recent Ubuntu versions there's a dconf option (if you are using GNOME or Unity):
org.gnome.desktop.input-sources xkb-options
which you can set via dconf-editor or gsettings. For example,
gsettings set org.gnome.desktop.input-sources xkb-options "['ctrl:nocaps']"
This option is permanent across reboots.
edwin
- 3,739
- 20
- 32
1
You don't need to put this /usr/bin/setxkbmap -option "ctrl:nocaps" command on startup applications.Hust place it inside ~/.bashrc file.
gedit ~/.bashrc
Add this line to the .bashrc file,
/usr/bin/setxkbmap -option "ctrl:nocaps"
Logout and loginback to take effect.
Avinash Raj
- 77,204
- 56
- 214
- 254
-
1Thanks for the workaround, but I am curious why it is Startup Applicaions not working as intented. – PuercoPop Apr 12 '14 at 11:46