Permanently remapping caps lock to ctrl

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
f3nix

Permanently remapping caps lock to ctrl

Post by f3nix »

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 http://www.ehow.com/how_8721059_write-a ... linux.html, 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

#!/bin/sh

### BEGIN INIT INFO
# 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.
### END INIT INFO


xmodmap -e "remove Lock = Caps_Lock"
xmodmap -e "keysym Caps_Lock = Control_L"
xmodmap -e "add Control = Control_L"
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
äxl

Re: Permanently remapping caps lock to ctrl

Post by äxl »

Did you try sh -c "script.sh" in Startup Applications?
Also: Could you please check the owner of the file?
killerisation

Re: Permanently remapping caps lock to ctrl

Post by killerisation »

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 http://forums.linuxmint.com/viewtopic.php?f=90&t=108803
Any ideas?
Locked

Return to “MATE”