I was having recurring trouble logging into my laptop. Eventually I realized that I was accidentally touching my mousepad while typing my password, which caused subsequent typing to go to the middle of my password instead of the end. Naturally the system didn’t accept this variant of my password! Here’s how I avoided this issue.
Automatic Touchpad Disabling When Logged In
When I’m logged in, I configured XFCE to disable my touchpad while typing, which solves the same issue. Do this via XFCE settings > Mouse and Touchpad > Device tab > Device: SynPS/2 Synaptics TouchPad > Touchpad tab > check “Disable touchpad whlie typing”.
However, I couldn’t work out if there was a way to apply the same setting at the login screen to. In the end, I decided to completely disable the touchpad at the login screen, then re-enable it upon successful login. I can still use the trackpoint (red button) mouse if I need to use a mouse while logging in.
A Failed Attempt Using xinput
Theoretically, the xinput command may be used to disable/reenable the
touchpad:
$ xinput list
...
⎜ ↳ SynPS/2 Synaptics TouchPad id=10 [slave pointer (2)]
...
$ xinput --disable 10
$ xinput --ensable 10Unfortunately, if you have the Synaptics driver installed (Debian package
xserver-xorg-input-synaptics), then the --disable command works, but
--enable doesn’t! This is a bit of a problem…
Disabling The Touchpad Using synclient
It turns out the synclient command can also control a Synaptics touchpad,
and specifically can disable/re-enable it. This approach works!
$ synclient touchpadoff=1
$ synclient touchpadoff=0Automating Lightdm
To run these commands at the login prompt (to disable the touchpad), and when
the user has logged in (to re-enable it), simply add the following to
/etc/lightdm/lightdm.conf:
[Seat:*]
greeter-setup-script=synclient touchpadoff=1
session-setup-script=synclient touchpadoff=0