#!/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
成功执行,但其余的不是。.
我认为问题可能是这些命令应该在我登录后执行,而 rc.local 可能在操作系统启动时执行,因此它可能没有效果。.
如何在启动时执行指定的命令?