Permanently remapping caps lock to ctrl

Forum rules
Before you post please read how to get help
Level 1
Level 1
Posts: 1
Joined: Fri May 25, 2012 12:31 pm

Permanently remapping caps lock to ctrl

Postby f3nix » Fri May 25, 2012 1:38 pm

I wrote a script to remap Caps Lock to be Ctrl but can't make it autorun on boot. I followed the procedure described here, and I even added LSB tags to the script.

I also tried modifying /etc/rc.local directly and

adding the script to Startup Applications as well but with no luck.

When i run it myself it works fine. I am using the latest LMDE version on a laptop with external usb keyboard. (nothing changes to the laptop keyboard either).
Any ideas? Here's the script

*UPDATE* : I Found the solution seconds after posting this... Its a simple option on the keyboard preferences... Although it still bugs me why the script didn't autorun. Any suggestions are welcome.

Code: Select all


# Provides:          set_caps_ctrl
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start daemon at boot time
# Description:       Enable service provided by daemon.

xmodmap -e "remove Lock = Caps_Lock"
xmodmap -e "keysym Caps_Lock = Control_L"
xmodmap -e "add Control = Control_L"

User avatar
Level 5
Level 5
Posts: 524
Joined: Fri Apr 06, 2012 6:14 am
Location: Germany

Re: Permanently remapping caps lock to ctrl

Postby äxl » Fri Jun 01, 2012 11:34 am

Did you try sh -c "" in Startup Applications?
Also: Could you please check the owner of the file?
My Linux history: Ubuntu 10.04 - 10.10 - LMDE 201109 - UP4 My sources.list/preferences

Computers is not science. And it's not magic - it's something in between.

Level 1
Level 1
Posts: 1
Joined: Mon Dec 03, 2012 8:57 pm

Re: Permanently remapping caps lock to ctrl

Postby killerisation » Mon Dec 03, 2012 9:03 pm

I have the same problem.
"xmodmap .Xmodmap" works for the duration of the session but following these instructions to autostart the remapping makes no difference viewtopic.php?f=90&t=108803
Any ideas?

Return to “MATE”