RHEL 6 关闭ThinkPad e42触摸板

鄙人新配了一笔记本ThinkPad e42(i3 2310m) ,触摸板一直容易误操做,故寻求解决办法,找了好久 ,终于解决,现记录以下:shell

安装 xorg-x11-apps 包: yum install xorg-x11-appsbash

而后:app

# 屏蔽
xinput set-int-prop 12 "Device Enabled" 8 0
# 启用
xinput set-int-prop 12 "Device Enabled" 8 1


写一小命令:
#!/bin/bash
#echo "==================================="
#echo "============触摸板管理程序============"
if [ $1 == 'on' ]
then
        xinput set-int-prop 12 "Device Enabled" 8 1
        echo "触摸板开启成功!"
elif [ $1 == 'off' ]
then
        xinput set-int-prop 12 "Device Enabled" 8 0
        echo "触摸板关闭成功!"
else
        echo "请输入参数:on/off"
        echo "好比开启触摸板:chumoban on"
fi