Disable tapping and scrolling on a Synaptics touchpad

If you have a laptop and run GNU/Linux, you’ll frequently find that certain settings are enabled by default for your built-in touchpad… ones that will either strike you as a wonderful convenience, or drive you up the wall.

“Tapping,” if you’re not familiar with the term, means the computer registers a click on the left mouse button if you tap the touchpad with your finger.  Unfortunately, this touchpad is almost always far too sensitive, which translates into many accidental “clicks” if you don’t move your finger with a feather touch.  (In case you can’t tell by now, I wish they’d disable tapping by default.)

“Scrolling” encompasses 3 types of scrolling:

  • Vertical scrolling means a strip along the right side of the touchpad is used as if it was a scroll wheel.  If there is room to scroll in the existing window, you move your finger up and down along the right-side edge of the pad and the window will scroll up or down accordingly.  This is enabled by default.
  • Horizontal scrolling means a strip along the bottom edge of the touchpad is used like a horizontal scroll wheel.  Again, if there’s room to scroll side to side in the existing window, you move your finger left and right along the bottom edge of the pad and the window will scroll left and right.  This is enabled by default.
  • Circular scrolling will be familiar to many users of mp3 players.  Making a circular motion acts as a scroll wheel.  Clockwise scrolls down, counterclockwise scrolls up.  This must be manually enabled.

Again, these are all features I’d rather disable.  The areas of the touchpad for vertical and horizontal scrolling are designated by invisible lines (whose location can be adjusted), and if you accidentally cross them you’ll be doing a lot of accidental scrolling.

There’s also a (I think) nice feature called “Emulate3Buttons.”  Some mice have 3 buttons, others have 2.  Like the right mouse button, the middle mouse button is designated for some special functions.  If you only have a 2-button mouse and you enable this option, you can click the left and right mouse button at the same time and it will be as if you clicked the middle mouse button on a 3-button mouse.

Here I’ll discuss how to change these settings by directly editing a configuration file (xorg.conf).  There are GUI-based (read: point and click) utilities to do this, such as gsynaptics, but they can be problematic for a couple of reasons.  First, in order to work they want the “SHMConfig” option to be enabled.  99 times out of 100 it won’t be, for security reasons.  Of course, in order to enable it you have to manually edit xorg.conf anyway!  If you’re gonna be there anyway, why not just make the needed changes directly?  Second, there seems to be no general consensus on how to enable SHMConfig.  Some distributions or versions want “SHMConfig” “true” and some want “SHMConfig” “on”, and I haven’t seen any correlating factor that would tell you which one to use ahead of time.  So you may end up editing xorg.conf not once but twice.  Lastly, I mentioned security reasons – enabling SHMConfig grants extra permissions to other users of the computer in question.  If you’re the only user it’s not a problem, but if you have to share it with other, less trusted users it might not be a good idea.  As a computer technician I’ve seen a lot of nightmarish problems caused by lax security measures over the years, so when it comes to security I tend to fall on the paranoid side.  The more I see, the more paranoid I get.  So, I’ve opted for the most direct and secure method of getting this done.

Let’s get this show on the road, shall we?

1. Open a terminal window and log in as root. You’ll need to edit xorg.conf as the root user (in other lingo, this is the “administrator”).  In most distributions, this will be accomplished by typing “su” at the prompt.  (Other distributions, such as (K)Ubuntu or Mint, will skip this step and instead have you type “sudo” before the command you want to execute – in other words, skip step 1 here and type “sudo” in front of the command in step 2.)  Here I’m logged in as g33kgrrl and use the su command to switch user to root. It prompts me for my root password and the prompt changes to show me I’m now logged in as root.

g33kgrrl@home ~ g33kgrrl$ su
root@home ~ g33kgrrl#

2. Edit /etc/X11/xorg.conf . The configuration file xorg.conf is in the folder /etc/X11 .  Open your favourite text editor by typing its name at the command prompt followed by the location of xorg.conf .  For text editors I recommend gedit if you’re using the Gnome desktop environment and kwrite if you’re using KDE.  Here I’m using KDE so I’ll use kwrite. Note that the “X” in “X11” is a capital letter, not lower case – this is important!

root@home ~ g33kgrrl# kwrite /etc/X11/xorg.conf

Now kwrite will open xorg.conf and I can start editing.

3. Edit or create an entry (section) for your Synaptics touchpad. Scroll through the file and look for a section that starts something like this:

Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"

The “Identifier” line might vary a bit, but the “Section” and “Driver” lines should match. Below is the relevant section from my xorg.conf ; edit yours to match. If you don’t see any section like this you will have to create one – you can just copy and paste the snippet below.

Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Emulate3Buttons" "on"
Option "MaxTapTime" "0"
Option "HorizScrollDelta" "0"
Option "VertScrollDelta" "0"

The option “SendCoreEvents” “true” sets the touchpad as the default mouse.
“Emulate3Buttons” “on” enables 3-button emulation, described above.
“MaxTapTime” “0” disables tapping.
“HorizScrollDelta” “0” disables horizontal scrolling.
“VertScrollDelta” “0” disables – surprise! – vertical scrolling.

4. Incorporate the Synaptics touchpad section into the default configuration. There should also be a section that starts with:

Section "ServerLayout"

(Again, if you don’t have such a section you’ll need to add one.) Now, just before that section ends with “EndSection” , add a line for your touchpad (highlighted in red below).  The part in quotes should match the “Identifier” line in your Synaptics touchpad section:

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Synaptics Touchpad"

5. Save your changes.

6. Reboot. Theoretically, you need only restart X (that is, log out and then log back in, without actually rebooting) in order for the changes to take effect. But you know how the saying goes… “In theory, theory and practice are the same. In practice, they are not.” Trust me, save yourself some trouble and just reboot.

That’s it – see, not too painful. Ahhhh, that’s better… isn’t life so much nicer without accidental clicks and unexpected scrolling?



One thought on “Disable tapping and scrolling on a Synaptics touchpad

  1. Pingback: Disable Trackpad Clicks on Ubuntu 10.04 Drija

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s