ubuntu多显示器单触摸屏校准
多显示器单触摸屏屏幕校准
0、触摸屏重定向
sudo xinput map-to-output 13 DP1 #将触摸屏映射到指定的显示器
其中:13为触摸屏设备id,可通过 xinput命令查看 ILITEK ILITEK-TP id=13 [slave pointer (2)];
DP1为指定的显示设备名,可通过$ xrandr命令查看,见最下面附件。
1、安装屏幕校准器
$ sudo apt-get install xinput-calibrator
2、查看屏幕分辨率
在 System settings --> Display 查看屏幕分辨率
3、手动设置校准窗口的大小(有多个显示器而只有一个触摸屏时用的,用于设置只指定窗口)
我的电脑有两个显示器,一个 1920x1080, 一个 1024x768,我只校准左边的显示器,如
Usage:xinput_calibrator --geometry <w>x<h>
--geometry: manually provide the geometry (width and height) for the calibration window
$ sudo xinput_calibrator --geometry 1920x1080 注意:1920x1080 此处是字母x
Warning: multiple calibratable devices found, calibrating last one (ILITEK ILITEK-TP)
use --device to select another one.
Setting calibration data: 0, 16384, 0, 9600
Calibrating EVDEV driver for "ILITEK ILITEK-TP" id=14
current calibration values (from XInput): min_x=0, max_x=16384 and min_y=0, max_y=9600
Doing dynamic recalibration:
Setting calibration data: 82, 32942, 155, 9796
--> Making the calibration permanent <--
copy the snippet below into '/etc/X11/xorg.conf.d/99-calibration.conf' (/usr/share/X11/xorg.conf.d/ in some distro's)
Section "InputClass"
Identifier "calibration"
MatchProduct "ILITEK ILITEK-TP"
Option "Calibration" "82 32942 155 9796"
Option "SwapAxes" "0"
EndSection
我的电脑是在/usr/share/X11/xorg.conf.d/目录下
4、按提示说明 拷贝校正信息到下面的文件中:
sudo gedit /usr/share/X11/xorg.conf.d/99-calibration.conf
将 下面的内容拷贝进去
Section "InputClass"
Identifier "calibration"
MatchProduct "ILITEK ILITEK-TP"
Option "Calibration" "82 32942 155 9796"
Option "SwapAxes" "0"
EndSection
5、完成。
附录:---相关的常用命令-------------------
1、查看 xinput_calibrator 使用方法
$ xinput_calibrator -h
xinput_calibrator, v0.7.5
Usage: xinput_calibrator [-h|--help] [-v|--verbose] [--list] [--device <device name or XID or sysfs path>] [--precalib <minx> <maxx> <miny> <maxy>] [--misclick <nr of pixels>] [--output-type <auto|xorg.conf.d|hal|xinput>] [--fake] [--geometry <w>x<h>] [--no-timeout]
-h, --help: print this help message
-v, --verbose: print debug messages during the process
--list: list calibratable input devices and quit
--device <device name or XID or sysfs event name (e.g event5)>: select a specific device to calibrate
--precalib: manually provide the current calibration setting (eg. the values in xorg.conf)
--misclick: set the misclick threshold (0=off, default: 15 pixels)
--output-type <auto|xorg.conf.d|hal|xinput>: type of config to output (auto=automatically detect, default: auto)
--fake: emulate a fake device (for testing purposes)
--geometry: manually provide the geometry (width and height) for the calibration window
--no-timeout: turns off the timeout
--output-filename: write calibration data to file (USB: override default /etc/modprobe.conf.local
2、查看输入设备
$ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver id=11 [slave pointer (2)]
⎜ ↳ ILITEK ILITEK-TP id=13 [slave pointer (2)]
⎜ ↳ ILITEK ILITEK-TP id=14 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ Logitech USB Receiver id=10 [slave keyboard (3)]
↳ USB2.0 Camera
id=12 [slave keyboard (3)]
3、查看输出设备
$ xrandr
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
DP1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
1920x1080 60.0*+
1680x1050 60.0
1280x1024 75.0 60.0
1440x900 59.9
1280x960 60.0
1280x720 60.0
1024x768 75.1 70.1 60.0
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 75.0 72.8 66.7 60.0
720x400 70.1
HDMI1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
ubuntu多显示器单触摸屏校准的更多相关文章
- Ubuntu触摸屏校准
我是在ubuntu系统中使用触摸屏,我的是两块屏幕一个是触摸屏幕一个是普通的屏幕,触摸屏使用需要校准,所以要直接入一个触摸屏,或者两个屏幕是复制的关系,不能是扩展. 1.安装已下的两个软件,有可能第一 ...
- Ubuntu触摸屏校准命令
1.sudo apt-get install utouch 2.sudo apt-get install xinput-calibrator 3.sudo xinput_calibrator(校准两次 ...
- ANDROID5.0触摸屏校准
1.校准原理: 1)首先生成校准用的参数,可以适用tslib生成校准参数,也可以使用校准app生成:使用校准app进行校准对使用者要求比较低,使用者可以不用学习复杂的命令:本文使用app方式 2)生成 ...
- Ubuntu接显示器问题
1.Could not apply the stored configuration for monitors 解决办法:Ubuntu在开机进入桌面的时候,会调用gnome-setting-deamo ...
- ubuntu 设置显示器的亮度
ubuntu电脑重新启动后,亮度都变成了最亮.似乎也没胡地方可以设置.只好通过写个脚本来做这个事了. # -*- coding: utf-8 -*- import dbus bus = dbus.Se ...
- 树莓派0 ubuntu无显示器ssh登录终端
在此记录倒腾树莓派的过程 一.本文前提 已经装好系统,我装的是官方的Raspbian系统,以下是系统下载地址和工具地址 (默认帐号:pi,默认密码:raspberry) 镜像下载: http://do ...
- ubuntu 关闭显示器的命令
sleep 2s ; gnome-screensaver-command -a或sleep 2s ; xset dpms force off2秒后关闭显示器
- 触摸屏校准tslib的配置文件
./autogen.sh#sleep 10./configure --prefix=/usr/lxl/tslib --host=arm-linux CC=arm-linux-gcc#sleep 100 ...
- ubuntu 16.04 单用户____修改忘记密码
1.开机按ESC,出现如下界面,选中如下选项 2.按回车键进入如下界面,然后选中有recovery mode的选项 3.按e进入如下界面,找到图中红色框的recovery nomodeset并将其删掉 ...
随机推荐
- 接口测试——带token请求post接口(postman学习)
今天遇到一个接口,是添加备注的,post类型,访问参数中需要带上token才行,我在header 中直接加token参数,接口总返回 403,请登陆 1.考虑yapi接口平台集成的是postman的接 ...
- layui 下拉框不显示解决方法
添加以下代码 layui.use('form', function(){ var form = layui.form; form.render(); });
- C#定义一个方法的3种形式
[定义方法对象,可使用签名兼容的委托变量来引用它] 1.定义一个方法,采用常规标准写法(V1.0) [本质上是签名兼容的委托类型的实例 / 对象] 2.定义一个方法,采用匿名方法(delegate)( ...
- 将内网ip映射到外网域名
一.应用场景 1.在本地测试微信支付回调 二.如何使用natapp实现内网穿透 1.第一步注册账号并进行实名制认证 natapp网站地址 https://natapp.cn/ 2.第二步申请免费隧道 ...
- Python实现一条基于POS算法的区块链
区块链中的共识算法 在比特币公链架构解析中,就曾提到过为了实现去中介化的设计,比特币设计了一套共识协议,并通过此协议来保证系统的稳定性和防攻击性. 并且我们知道,截止目前使用最广泛,也是最被大家接受的 ...
- android -------- 常用依赖库
// bannercompile 'com.youth.banner:banner:1.4.9' // recyclecompile 'com.android.support:recyclervie ...
- Confluence 6 从一个模板中创建一个空间
Confluence 已经存储了一系列的模板,这些模板被称为 空间蓝图(space blueprints),这模板具有一些自定义的主页,边栏或者可能有蓝图页面或一些示例内容来帮助你开始使用 Confl ...
- 02 flask 请求钩子、异常捕获、上下文、Flask-Script 扩展、jinja2 模板引擎、csrf防范
一 请求勾子 在客户端和服务器交互的过程中,有些准备工作或扫尾工作需要处理,比如: 在请求开始时,建立数据库连接: 在请求开始时,根据需求进行权限校验: 在请求结束时,指定数据的交互格式: 为了让每个 ...
- python基础之生成器,生成器函数,列表推导式
内容梗概: 1. 生成器和生成器函数. 2. 列表推导式. 1.生成器函数1.1 生成器函数. 就是把return换成yield def gen(): print("爽歪歪") y ...
- 子类父类(虚函数下的 引用指针 对象)->看来没有子类指针这回事
#include<iostream> using namespace std; class Father { public: Father() { cout << " ...