I have two commands that change keyboard behaviour: xset r rate 120 66 /usr/bin/setxkbmap -option ctrl:nocapsWhen I open a terminal and execute them, they change auto-repeat settings and remap CAPS LOCK to control, not only in the terminal window but for my whole desktop environment.I'd like them to be run automatically when I login to my account (either using a GUI or via ssh/etc.).  I'd like to do this in a robust way (i.e. I don't want to use distribution-specific tools) and I don't want to use any GUI tools.I supposed that there is some file that is executed at login and I should just paste these commands there, but adding them to ~/.bash_login didn't have any effect, similarly with ~/.bash_profile.  With ~/.profile, only /usr/bin/setxkbmap -option ctrl:nocaps had effect.How can I achieve this?
A robust way to execute a command/run a script at login?
shell script;x11;login;profile
Usually you put X related items that you'd like to run in the context of the user (you) in one of 2 files:$HOME/.xsession$HOME/.xinitrcFor GNOME desktops you can put commands in $HOME/.gnomercFor KDE you put commands in $HOME/.kde/AutostartAlternative ApproachSome commands such as xset may not work from within these files. If you'd still like to automate something like this you may be able to add it as a Startup Application.Step #1Create a shell script, xset.bash.#!/bin/bashxset r rate 120 66Step #2Add a startup task to run the shell script. Open the application Startup Applications, under System →  Preferences                    Then click the Add button                                Once you're done OK & Close the dialogs and to test it out logout and log back in.ReferencesStarting Your X Session: .xinitrc and .xsession