My entire rc.local file
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
cd ~/xcape && ./xcape -e 'Control_L=Escape'
exit 0
This is supposed to make my caps lock key (which is set to Left control) become an escape key when pressed by itself, and be ctrl when pressed and held.
The command in the rc.local file works fine when I do it on the terminal, but when I boot up my computer, I have to run the command manually because the rc.local file didn't run the command... or it failed.
sudo service rc.local start
might be a better way to test thansudo /etc/init.d/rc.local start
. – muru Oct 29 '14 at 00:14