ubuntu多显示器单触摸屏校准
多顯示器單觸摸屏屏幕校準(zhǔn)
0、觸摸屏重定向
sudo xinput map-to-output 13 DP1 #將觸摸屏映射到指定的顯示器
其中:13為觸摸屏設(shè)備id,可通過 xinput命令查看 ILITEK ILITEK-TP id=13 [slave pointer (2)];
DP1為指定的顯示設(shè)備名,可通過$ xrandr命令查看,見最下面附件。
1、安裝屏幕校準(zhǔn)器
$ sudo apt-get install xinput-calibrator
2、查看屏幕分辨率
在 System settings --> Display 查看屏幕分辨率
3、手動(dòng)設(shè)置校準(zhǔn)窗口的大小(有多個(gè)顯示器而只有一個(gè)觸摸屏?xí)r用的,用于設(shè)置只指定窗口)
我的電腦有兩個(gè)顯示器,一個(gè) 1920x1080, 一個(gè) 1024x768,我只校準(zhǔn)左邊的顯示器,如
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
將 下面的內(nèi)容拷貝進(jìn)去
Section "InputClass"
Identifier "calibration"
MatchProduct "ILITEK ILITEK-TP"
Option "Calibration" "82 32942 155 9796"
Option "SwapAxes" "0"
EndSection
5、完成。
附錄:---相關(guān)的常用命令-------------------
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、查看輸入設(shè)備
$ 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、查看輸出設(shè)備
$ 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)
總結(jié)
以上是生活随笔為你收集整理的ubuntu多显示器单触摸屏校准的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 软件测试团队分为哪些人员,产品团队、开发
- 下一篇: 计算机与技术卓越信息技术,2018版计算