I'm trying to run this in my /etc/init.d/rc.local. I had to manually add the exit 0 because it wasn't there by default if that makes any difference.
cd /home/john/xcape && ./xcape -e 'Control_L=Escape'
exit 0
So to check if it works, I run this, and it returns..
$ sudo service rc.local start
Unable to connect to X11 display. Is $DISPLAY set?
Yes, it is set.
$ echo $DISPLAY
john-Ubuntu:0
I went through this tutorial http://pic.dhe.ibm.com/infocenter/hatshelp/v80/index.jsp?topic=%2Fcom.ibm.hats.doc%2Fdoc%2Fudispenv.htm
I looked around on AskUbuntu and they all seem to point to this same step.
/etc/rc.local
,/etc/init.d/rc.local
is the service for running that file. And Upstart controls the environment that it is run in: http://askubuntu.com/questions/2075/whats-the-difference-between-service-and-etc-init-d/47664#47664. Lastly, a GUI command shouldn't go inrc.local
, it's run too early. Try~/.profile
or~/.xsessionrc
, since this is for your user.. – muru Nov 01 '14 at 19:57