ubuntu10.10关闭触摸板

#! /bin/bash
command=$1
if [ $command = "off" ]; then
  echo "close touchpad"
  `sudo rmmod psmouse`
else
  echo "open touchpad"
  `sudo modprobe psmouse`
fi
echo "success!"

保存为 touchpad
添加可执行权限 chmod u+x touchpad
放到/usr/local/bin目录下
编辑~/.bashrc,在最后加上
alias tpoff='touchpad off'
alias tpon='touchpad on'

更新source ~/.bashrc
以后即可以用tpoff关闭触摸板tpon打开触摸板了

猜你喜欢

转载自l-d.iteye.com/blog/1269759
今日推荐