Permanently remapping caps lock to ctrl

Permanently remapping caps lock to ctrl

Postby f3nix on 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 http://www.ehow.com/how_8721059_write-autorun-script-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"
f3nix
Level 1
Level 1
 
Posts: 1
Joined: Fri May 25, 2012 12:31 pm

Linux Mint is funded by ads and donations.
 

Re: Permanently remapping caps lock to ctrl

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

Did you try sh -c "script.sh" 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.
User avatar
äxl
Level 5
Level 5
 
Posts: 524
Joined: Fri Apr 06, 2012 6:14 am
Location: Germany

Re: Permanently remapping caps lock to ctrl

Postby killerisation on 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?
killerisation
Level 1
Level 1
 
Posts: 1
Joined: Mon Dec 03, 2012 8:57 pm


Return to MATE

Who is online

Users browsing this forum: No registered users and 6 guests