#StackBounty: #debian #keyboard-shortcuts #xfce #xkb execute command to swap caps lock and ctrl at startup

Bounty: 50

I’m a bit puzzled why this is not working as intended. My goal is to map the caps lock key to control. I’m using debian. For this I’m using the following command

/usr/bin/setxkbmap -layout "$(setxkbmap -print | awk -F + '/xkb_symbols/ {print $2}')" -option ctrl:nocaps

which works perfectly fine if I execute it via the terminal. However, I want this to be done at startup or login and always execute it manually. I’ve tried to add this command to the automatic startup session application in XFCE as well as putting the command in my ~/.profile. However, both options don’t seem to work. I still have to execute it manually (which after it is correctly mapped). What am I doing wrong?


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.