I wrote the following script to enable/disable the touch pad. I use it on a Star3 running Ubuntu 10.04.
If you save the script as ~/touchpad, and make it executable, use the command "~/touchpad 0" to disable the touchpad, or "~/touchpad 1" to enable it.
It could probably be set up as a login script, but I haven't tried that.
Code:
#!/bin/bash
# Usage:
# touchpad 1 - Enable touchpad.
# touchpad 0 - Disable touchpad.
# Identification string for touchpad device.
TOUCHPADSTRING='Sentelic FingerSensingPad'
# sed pattern string
# .* - any text
# \x9 - tab character
# id= - literal
# \( - begin capture
# [0-9][0-9]* - one or more decimal digits
# \) - end capture
# \x9 - tab character
# .* - any text
# sed replacement string
# \1 - string captured in pattern
TOUCHPADDEVICE=$(xinput --list | grep -i "$TOUCHPADSTRING" | sed 's/.*\x9id=\([0-9][0-9]*\)\x9.*/\1/')
if [ -n "$TOUCHPADDEVICE" ]; then
echo The touchpad device is "$TOUCHPADDEVICE".
if [ "$1" == '1' ]; then
echo Enabling touchpad...
xinput --set-prop "$TOUCHPADDEVICE" 'Device Enabled' 1
elif [ "$1" == '0' ]; then
echo Disabling touchpad...
xinput --set-prop "$TOUCHPADDEVICE" 'Device Enabled' 0
else
echo No action performed.
fi
else
echo No touchpad device found.
fi
Bookmarks