[root@localhost ~]# cat /etc/xdg/autostart/disable-touchpad.desktop
[Desktop Entry]
Name=disable-touchpad
Name[zh_CN]=禁用触摸版
TryExec=/usr/bin/disable-touchpad
Exec=/usr/bin/disable-touchpad
Terminal=false
Type=Application
StartupNotify=false
NoDisplay=true
[root@localhost ~]# cat /usr/bin/disable-touchpad
# !/bin/bash
# # Dapeng
# #
# # 先使用 xinput --list 命令 或
# # xinput --list --name-only |grep TouchPad 命令 查看触摸板名称
# # T480的本 触摸板可能都叫 “SynPS/2 Synaptics TouchPad”
# #
TOUCHPAD_NAME=`xinput --list --name-only |grep TouchPad`
echo "TouchPad name is : $TOUCHPAD_NAME"
TOUCHPAD_ID=`xinput --list --id-only "$TOUCHPAD_NAME"`
echo "TouchPad ID is : $TOUCHPAD_ID"
# # xinput set-int-prop `xinput --list --id-only 'SynPS/2 Synaptics TouchPad'` "Device Enabled" 8 0
xinput set-int-prop `xinput --list --id-only $TOUCHPAD_ID` "Device Enabled" 8 0
[root@localhost ~]# xdg-desktop-menu install /etc/xdg/autostart/disable-touchpad.desktop --novendor