Why does this command doesn't run at startup
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?
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.
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.