您的位置:首页 > 运维架构 > Linux

安装linux系统后,笔记本触摸板,那些让人蛋疼的事!

2014-05-04 21:24 567 查看
运行环境:

系统:Centos 6.5 64bit

笔记本:sony SVE1512S7C

X Server: 1.13.0

问题描述:

(1)

   centos6.5自带的touchpad管理程序,只能支持 Right Scrolling,不支持Circular Scrolling(很爽的哦!)。

(2)

    本人笔记本触摸板的按键实在是太难按了,自带的触摸板管理程序不支持click by tapping。(难以想像,以前蒙哥是用了多大的力气才能 touch a event。)

(3)

  在coding过程中,用鼠标的效率会下降不少。一个配置适合自己的触摸板会提高不少效率。

(4)

    无线鼠标很费电,用触摸板会省不少银子。(这个原因是本人造作的,呵呵)

说白了,就是这套Centos自带的管理程序不适合蒙哥。

解决方案:

1.使用图形管理软件,gpointing-device-settings 

        本人测试,编译安装,会出现“No package 'gnome-settings-daemon' found”,configure无法通过。

google了一翻说是bug,哎呀,点背啊!但是我还是想尝试一下,因为那老外描述的bug和我现在碰到的状况不是十分的相似啊。接下来,怎么办?从错误提示信息上不难看出是缺少“gnome-settings-daemon”,但是怎么可能啊,这个包可是gnome require的啊。执行命令查看一下到底有没有这个包。

  rpm -qa | grep gnome-settings-daemon  





果然不出我所料,这个包已经安装了。还是不死心,yum一下吧,是不是有其他的依赖包没有安装?

  yum search gnome-settings-daemon  






原来还有两个额外的包没有装,装上试试行不行(抱着试试看的心理,hh)果不其然,confingure通过。

  confingure  --prefix=/opt/touchpad  (给自己留条后路,指定安装目录)安装完成后,并没有像ubuntu一样会给一个panel(网上有安装在ubuntu上的朋友说,会在“系统——>首选项”有的菜单)。我直接运行

  /opt/touchpad/bin/gpointing-device-settings  






        欣喜若狂啊!调整好参数倒是产生了效果,重启电脑,程序没有任何反应!!!

  ps -aux | grep  gpointing-device-settings  

没有发现程序运行,手动运行再次设置,但是还是没有生效。难道程序只能运行一次么?(撞墙的心都有)。还是耐心在github上找到了那个项目https://github.com/GNOME/gpointing-device-settings

最近一次更新是两年前,一个branch,原来只有一个小朋友在写呀,再google一下,发现这个软件也是bug层出不穷。

唉,失败告终,悲哀阿!!!

2.修改gnome的配置文件。

        google翻了很长时间,才找到配置文件。不容易啊!

  vim  ~/.gconf/desktop/gnome/peripherals/touchpad/%gconf.xml  






虽然可以通过修改配置文件,配置click by tapping,但是不能实现“Circular Scrolling”,美中不足!

3.通过shell script

        这是我想到的终极办法。但是,话说蒙哥的script是很烂的。我自己写,太难了!百度+google,终于找到了一些像样的touchpad配置脚本,然后,按照自己的操作习惯稍作配置,这里就有了两个版本。

 
scroll with single fingers
  scroll with two fingers 
 可以自己随心调整自己喜欢的。




#!/bin/bash
# Touchpad settings
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Single-Finger Pressure" 32 10
# Touchpad - width for single fingers for scrolling
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Single-Finger Width" 32 8
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Single-Finger Scrolling" 8 1
# Touchpad - scroll with single fingers - horiz and vert
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Single-Finger Scrolling" 8 1 1
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Jumpy Cursor Threshold" 32 150
# Touchpad - mouse speed
xinput set-float-prop 'SynPS/2 Synaptics TouchPad' 'Device Accel Velocity Scaling' 20
# Touchpad - vert scroll with the right edge
xinput set-int-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Edge Scrolling' 8 1 0 0
# Touchpad - MinSpeed MaxSpeed AccelFactor TrackstickSpeed
xinput set-float-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Move Speed' 1.000000 2 0.146843 40.000000
# Touchpad - Enable circular scrolling
xinput set-int-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Circular Scrolling' 8 1
# Enable palm detection while typing
xinput set-int-prop 'SynPS/2 Synaptics TouchPad' 'PalmDetect' 8 1
#!/bin/bash
# Touchpad settings
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 32 10
# Touchpad - width for two fingers for scrolling
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 32 8
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Two-Finger Scrolling" 8 1
# Touchpad - scroll with two fingers - horiz and vert
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 8 1 1
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Jumpy Cursor Threshold" 32 150
# Touchpad - mouse speed
xinput set-float-prop 'SynPS/2 Synaptics TouchPad' 'Device Accel Velocity Scaling' 20
# Touchpad - vert scroll with the right edge
xinput set-int-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Edge Scrolling' 8 1 0 0
# Touchpad - MinSpeed MaxSpeed AccelFactor TrackstickSpeed
xinput set-float-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Move Speed' 1.000000 2 0.146843 40.000000
# Touchpad - Enable circular scrolling
xinput set-int-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Circular Scrolling' 8 1
# Enable palm detection while typing
xinput set-int-prop 'SynPS/2 Synaptics TouchPad' 'PalmDetect' 8 1

        这样就完美了。但是,这个脚本要自动执行啊。我的做法是
  touch ~/.auto_exe/touchpad-settings-single-finger.sh  

  echo “~/.auto_exe/touchpad-settings-single-finger.sh“ >> ~/.zshrc    
蒙哥用的是zsh,用bash的这里要修该的是不一样的!
ok,搞定,touchpad既能click by tapping,又能Circular Scrolling。很爽吧!是不是太perfect了!呵呵!

总结经验:

shell 脚本是万能的;

适当调整解决问题的方案:修改系统配置文件-->安装软件-->写自己的shell脚本;

对待不成熟的软件,慎用!(gpointing就有很多bug)。

完毕!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息