1

I created a script to disable the touchpad in my computer. It works ok when I run it in a terminal. I did some work to make it start at startup because I wanted the touchpad to be disabled permanently, but the script did not work at startup. The touchpad was still enabled after startup. This is my configuration:

root@debian:/etc# cat /etc/init.d/touchpadOff 
#! /bin/sh
### BEGIN INIT INFO
# Provides:          touchpadOff
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start daemon at boot time
# Description:       Enable service provided by daemon.
### END INIT INFO
synclient TouchpadOff=1
root@debian:/etc# ls -l `find -name *touchpadOff` 
-rwxr-xr-x 1 root root 345 gru  8 02:26 ./init.d/touchpadOff
lrwxrwxrwx 1 root root  21 gru  8 01:35 ./rc0.d/K01touchpadOff -> ../init.d/touchpadOff
lrwxrwxrwx 1 root root  21 gru  8 01:35 ./rc1.d/K01touchpadOff -> ../init.d/touchpadOff
lrwxrwxrwx 1 root root  21 gru  8 02:26 ./rc2.d/S03touchpadOff -> ../init.d/touchpadOff
lrwxrwxrwx 1 root root  21 gru  8 02:26 ./rc3.d/S03touchpadOff -> ../init.d/touchpadOff
lrwxrwxrwx 1 root root  21 gru  8 02:26 ./rc4.d/S03touchpadOff -> ../init.d/touchpadOff
lrwxrwxrwx 1 root root  21 gru  8 02:26 ./rc5.d/S03touchpadOff -> ../init.d/touchpadOff
lrwxrwxrwx 1 root root  21 gru  8 01:35 ./rc6.d/K01touchpadOff -> ../init.d/touchpadOff
root@debian:/etc# 

How to make it work at startup in my Debian Jessie?

2

You have (at least) two choices:

  1. Don't load the driver of touchpad into kernel, so echo blacklist [yourdriver] > /etc/modprobe.d/nomouse. Then do a reboot, or manually remove it: rmmod [driver].
  2. synclient only runs after you started X, so put this synclient command to ~/.xinitrc or to /etc/X11/Xsession.d/ or make it one of the startup/autostart applications in your desktop environment.
  • I tried the first way and did not succeed. Tried for psmouse and synaptics. Then changed the filename to nomouse.conf. Nothing helped. The module of psmouse is listed in lsmod command output. Maybe this is not the name of my touchpad driver. The computer is Thinkpad T500. So I start to try the second method. – trzczy Dec 8 '16 at 11:27
  • I forgot to mention this rule is activated during booting. For manually remove module without reboot use the rmmod command. One more thing: there is no kernel module named synaptics, it's called synaptics_usb or synaptics_i2c (check with lsmod command) – Ipor Sircer Dec 8 '16 at 11:33
  • Ok so the command rmmod psmouse worked. I also managed the startup blacklist problem. Found on the internet that this should be run to provide a new module blacklist item: sudo dpkg-reconfigure linux-image-$(uname -r). It worked. – trzczy Dec 8 '16 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.