[sf-lug] Adding Scripts to Bash
Rick Moen
rick at linuxmafia.com
Wed Jul 6 19:04:29 PDT 2011
Quoting Alex Kleider (a_kleider at yahoo.com):
> Eric, I was the one at that meeting trying to solve this for you,
> along with help from others. We never got it the way you wanted it but
> what you wanted did come to pass after you opened the terminal (ran
> bash) for the first time. We did it by putting the command as a line
> in your ~/.bashrc file. You could do the same with any command.
Actually...
You know, if he wants to 'turn off my touchpad at startup', it's not
actually a terminal issue, nor a shell initialisation (.bashrc) issue.
(I was mislead by Eric defining the issue as 'automate the execution
once terminal is open'. Turns out, that's incorrect. This has nothing
to do with any terminal.)
He really wants to add that to his system startup scripts.
Should suffice to create the following as /etc/rc.local
#!/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.
#
/usr/bin/xinput set-int-prop "ETPS/2 Elantech Touchpad" "Device Enabled" 8 0
Then, do, 'sudo chmod +x /etc/rc.local' Then, reboot.
More information about the sf-lug
mailing list