Nei*_*wal 5 touchpad xorg synaptics xinput systemd
我想在登录 Ubuntu 16.10 之前禁用触摸板。
我曾尝试执行
#!/bin/bash
ID=$(/usr/bin/xinput list --id-only "SynPS/2 Synaptics TouchPad")
if [[ $ID ]]; then
/usr/bin/xinput --disable $ID
echo "Touchpad disabled"
else
echo "Touchpad not found"
fi
Run Code Online (Sandbox Code Playgroud)
在启动时使用 systemctl、rc.d 等等。似乎什么都不起作用,因为它需要运行 X 或其他东西。
添加以下代码到
/usr/share/X11/xorg.conf.d/*-synaptics.conf
# Disable generic Synaptics device, as we're using
Section "InputClass"
Identifier "SynPS/2 Synaptics TouchPad"
MatchProduct "SynPS/2 Synaptics TouchPad"
MatchIsTouchpad "on"
MatchOS "Linux"
MatchDevicePath "/dev/input/event*"
Option "Ignore" "on"
EndSection
Run Code Online (Sandbox Code Playgroud)
重启并测试是否有效。
| 归档时间: |
|
| 查看次数: |
5072 次 |
| 最近记录: |