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

command

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?

1
  • 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. Jan 1, 2014 at 14:11

1 Answer 1

1

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.

Solution:

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .