Ubuntu下触控板手势调节软件xSwipe

时间:2016-03-19 20:57:54   收藏:0   阅读:1635

楼主进了一台Thinkpad T450s,触控板支持4点触控,安装了ubuntu14.04 LTS之后,触控板只剩下双指滑动了,略有不爽,各种google,百度。

真找到办法了。

首先得知了touchegg,但是各种安装不上,折腾的我心力焦悴,最后偶然在知乎上有一位伙伴说了他的电脑用xSwipe搞定了。

于是转向xSwipe,在开源项目网站上GitHub上找到了这神器。 传送门,或者复制地址:https://github.com/iberianpig/xSwipe  到地址栏打开,可能打开得很慢,楼主备份了要下载的文件,下载地址放在文章末尾了。

官方的文档是英文版,虽然推荐读者阅读原版文章,但是为了照顾英文不好的小伙伴,我找到了一片中文博客(点我访问),或者复制地址:http://loliko.me/zai-linuxzhong-tian-jia-hong-mo-ban-shou-shi/      到地址栏打开

下面是GitHub上的说明文档:

 

xSwipe

xSwipe is multitouch gesture recognizer. This script make your linux PC able to recognize swipes like a Macbook.

Usage

Before running the script, you must first do some preparations.

  1. Download xSwipe
  2. Install X11::GUITest
  3. Enable SHMConfig

1. Download xSwipe

Type below code, download xSwipe from github

$ cd ~
$ wget https://github.com/iberianpig/xSwipe/archive/master.zip
$ unzip master.zip

2. Install X11::GUITest

To install libx11-guitest-perl from synaptic package manager Or run the script on the terminal run as

$ sudo apt-get install libx11-guitest-perl

NOTE: If using Ubuntu14.04, or later

Install older version synaptics driver that is compatible with xSwipe.
$ sudo apt-get install -y git build-essential libevdev-dev autoconf automake libmtdev-dev xorg-dev xutils-dev libtool
$ sudo apt-get remove -y xserver-xorg-input-synaptics
$ git clone https://github.com/Chosko/xserver-xorg-input-synaptics.git
$ cd xserver-xorg-input-synaptics
$ ./autogen.sh
$ ./configure --exec_prefix=/usr
$ make
$ sudo make install

3. Enable SHMConfig

Open /etc/X11/xorg.conf.d/50-synaptics.conf with your favorite text editor and edit it to enable SHMConfig

$ sudo gedit /etc/X11/xorg.conf.d/50-synaptics.conf

NOTE:You will need to create the /etc/X11/xorg.conf.d/ directory and create 50-synaptics.conf if it doesn‘t exist yet. $ sudo mkdir /etc/X11/xorg.conf.d/

/etc/X11/xorg.conf.d/50-synaptics.conf
Section "InputClass"
Identifier "evdev touchpad catchall"
Driver "synaptics"
MatchDevicePath "/dev/input/event*"
MatchIsTouchpad "on"
Option "Protocol" "event"
Option "SHMConfig" "on"
EndSection

To reflect SHMConfig, restart your session.

That‘s it for preparation.

Run xSwipe

To run xSwipe, type below code on terminal.

$ perl ~/xSwipe-master/xSwipe.pl

Note:You should run xSwipe.pl in same directory as "eventKey.cfg" .

You can use "swipe" with 3 or 4 fingers, they can call an event. Additionally, some gestures are avilable.

Option

Customize

You can customize the settings for gestues to edit eventKey.cfg. Please check this article, "How to customize gesture".

Bindable gestures

Example shortcut keys

Please let me know if you have any questions about this program.

 

 

我按照说明文档安装xSwipe之后,进行到最后一步  

perl ~/xSwipe-master/xSwipe.pl

遇到了错误提示
"Can‘t locate Smart/Comments.pm in @INC (you may need to install the Smart::Comments module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at /home/jackson/xSwipe-master/xSwipe.pl line 15."

真是蛋疼,每到最后关头就出问题。百度无果,最后还是google给了我答案,原文在这儿:https://forum.teksyndicate.com/t/perl-smart-comments/86880

做法就是,在终端下键入下列命令
sudo cpan -i Smart::Comments

此时要正常联网,楼主用代理模式上的网,各种错误,不知道具体原因在哪儿,最后用手机开wifi给电脑用,心疼啊(别问我为什么没wifi,学校不给大一新生校园网)
不出意外得话,应该在执行完执之前那条命令之后,就搞定了
使用
perl ~/xSwipe-master/xSwipe.pl

应该就可以开启触控板手势,目前我的电脑能实现三指滑动切换工作区,其它还没设置。
若有其它问题,可以在评论区留言,力所能及之处定出手相助。

xSwipe下载:http://pan.baidu.com/s/1gesqHm7
下载之后请先查看README.md文件,在xSwipe得其中一个子文件夹内。
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!