Sunday, February 26, 2012

Disable touchpad on Debian Linux

I used a notebook computer. I needed to type the text very often. When I typed, I accidentally touched the touchpad. This caused the cursor on the screen to move to somewhere else.

I had my USB mouse and I preferred this mouse.

I searched for the solution. Here is one: (Issue the commands below in Terminal.)


cd /etc/init.d

gedit disableTouchpad

Copy and paste the following:

# Provides:          disableTouchPad
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# X-Start-Before:    kdm gdm xdm hal
# X-Stop-After:      kdm gdm xdm hal
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: disable the touchpad
# Description:       prevent the touchpad from functioning

set -e

# Get lsb functions
. /lib/lsb/init-functions

modprobe -r psmouse

Save this file above.

chmod +x disableTouchpad

update-rc.d disableTouchpad start 01 2 3 4 5 . stop 99 0 1 6 .

You should see:
update-rc.d: using dependency based boot sequencing

Now, restart the computer:
shutdown -r now

The touchpad should be disabled by default.

I can connect and use my USB mouse.


I viewed this page on Debian Wiki and Patrik Willard's work to get the solution.

No comments: