#!/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.

echo "rc.local executed successfully" > /tmp/rclocal_executed

/usr/bin/synclient TapButton2=0
/usr/bin/synclient RightButtonAreaLeft=3
/usr/bin/tilda &

exit 0


echo "rc.local executed successfully" > /tmp/rclocal_executed

executed successfully, but the rest is not.

I assume the problem could be that these commands should be executed after I log in, and rc.local probably executed when just OS starts, therefore it might have no effect.

How to execute specified commands on a start up?

  • Maybe those commands have failed upon boot... Redirect their error stream to a file as well, for instance : /usr/bin/synclient [parameters] 2> /tmp/rclocal_errors, and read. – John WH Smith Jan 1 '14 at 14:11

The problem was that the following commands require X server to be running, but rc.local executed prior X initialized, therefore commands can not be executed.


In Ubuntu 12.04 invoke "Startup Applications" app, and put these commands there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.