So, one of the problems you're encountering is the evil that is ".bashrc
is only read for Bash shells in the terminal". Your GUI is NOT a Bash shell, so .bashrc
is NOT read by the GUI until you open the Terminal and then it activates/applies the keychange.
If we want it to work globally it needs to execute as part of the system independent of the .bashrc
. There're two options: Your user crontab for @reboot
which is a special case name. OR, a SystemD unit.
(I've tested neither solution, so I can't comment if one will work better than the other, if at all).
Let's start with the cron job option first.
Cron job approach
Open your terminal, and run crontab -e
.
Add this line to it:
@reboot setxkbmap -option ctrl:swapcaps
Reboot your system, and see if this works.
If it works, great. If not, then we have to try another approach.
Fallback Solution: Autorun gnome-terminal after login
If all else fails, add gnome-terminal
to your startup applications.
First, install gnome-startup-applications
:
sudo apt install gnome-startup-applications
Secondly, search your applications for "Startup Applications Preferences"
Add an item for gnome-terminal
. That way it'll autorun the terminal automatically.