Ubuntu系统使用命令禁用触摸板等输入设备


本人用的Ubuntu 10.04系统,笔记本上有鼠标和触摸板。默认下,触摸板是开启的,

有时候打字的时候会不时碰到触摸板,添了不少麻烦,所以得禁用触摸板,限于目前所用的UBUNTU上

没有相关的GUI工具来禁用。找到一方法,使用xinput命令:

终端下:

xinput list  列出所有input输入设备

  1. www.bkjia.com@bkjia:/etc/X11/xinit/xinput.d$ xinput list  
  2. ⎡ Virtual core pointer                      id=2    [master pointer  (3)]  
  3. ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]  
  4. ⎜   ↳ Logitech USB Optical Mouse                id=9    [slave  pointer  (2)]  
  5. ⎜   ↳ SynPS/2 Synaptics TouchPad                id=11   [slave  pointer  (2)]  
  6. ⎣ Virtual core keyboard                     id=3    [master keyboard (2)]  
  7.     ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]  
  8.     ↳ Power Button                              id=6    [slave  keyboard (3)]  
  9.     ↳ Video Bus                                 id=7    [slave  keyboard (3)]  
  10.     ↳ Power Button                              id=8    [slave  keyboard (3)]  
  11.     ↳ AT Translated Set 2 keyboard              id=10   [slave  keyboard (3)]   

出触摸输入设备SynPS/2 Synaptics TouchPad的 id = 11

再用以下命令就可以了, 0,表示禁止,1 ,表示开启

www.bkjia.com@bkjia:~$ xinput set-prop 11 "Device Enabled" 0  

状态:

  1. www.bkjia.com@bkjia:~$ xinput list-props 11  
  2. Device 'SynPS/2 Synaptics TouchPad':  
  3.     Device Enabled (121):   0  
  4.     Coordinate Transformation Matrix (123): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000  
  5.     Device Accel Profile (245): 0  
  6.     Device Accel Constant Deceleration (246):   1.000000  
  7.     Device Accel Adaptive Deceleration (247):   1.000000  
  8.     Device Accel Velocity Scaling (248):    10.000000  
  9.     Synaptics Edges (262):  1752, 5192, 1620, 4236  
  10. ............  

当注销或者重启系统后,被禁止的设备又被开启。对于synaptics 的触摸板,还有另种方法,不过效果差不多,如下:安装gsynaptics,:sudo apt-get install gsynapticsgsynaptics

在弹出对话框中,取消 启用触摸板 选项

这样就能禁止掉触摸板了,但跟先前用的xinput命令一样,当系统注销或重启时,触摸板又被开启了,还是有点麻烦.

不过可以在 启动应用程序 中 加入系统启动项.

google 了我网上的一些方法,实践后,发现也是挺麻烦的。而且对于不同的系统

还是有些不一样。

看到有说touchpad-indicator可以很方便解决问题,但搜了一下,没找到这个软件.

 

 

 

 

 

 

 

 

 

相关内容