Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

In almost all the large modern Linux distributions and in the last releases of Ubuntu-based distributions the touchpad was configured out of the box to have right, left and middle clicks and you could configure them easily. The middle click is usually done with a two or three-finger tap.

In Ubuntu 12.04 I haven't seen where to enable the middle click and it is not enabled by default.

share|improve this question
    
Answer will depend somewhat on the type of trackpad you have, but generally it's just a matter of adding the appropriate option to /etc/X11/xorg.conf. Some instructions for Synaptics trackpads: askubuntu.com/a/126539/43660 –  Chan-Ho Suh May 6 '12 at 10:32

8 Answers 8

You can make it work and persist in Ubuntu 12.04, even afer suspending, following these steps.

First, create a file with your script:

echo synclient TapButton3=2 > ~/touchpad_settings.sh

(You could place the script in another directory, e.g. /usr/bin or /etc, if you wanted it to be in a more "generic" place, in case you have multiple accounts in your ubuntu installation.)

Then make it executable:

chmod +x ~/touchpad_settings.sh

And finally, run the following command replacing "user" with your user name:

gsettings set org.gnome.settings-daemon.peripherals.input-devices hotplug-command "/home/user/touchpad_settings.sh"

Then reboot, or logout & login, or restart GNOME.

That's all!

For more information about this fix, go here.

share|improve this answer

I was searching for this and I found out that the touchpad has different settings for taps at the corners, and if you tap at the bottom right corner it does Right click. But if you tap at the top right corner it does Middle click. This is the default setting.

share|improve this answer
1  
Yeah, I found accidentally one tap on the top right corner on my multitouch touchpad acts like a middle click. Right click is two-finger tap for me. –  AliNa May 25 '13 at 11:08
1  
This appears to still be the default in Ubuntu 14.04. I can't believe that htere doesn't seem to be any documentation or even a GUI representation of this in the Mouse & Touchpad settings dialog. –  Ryan Fisher Oct 1 at 8:11

Another option which might be simpler and avoids startup scripts is the following.

  1. Stop the gnome settings daemon from overriding existing settings (font: Touchpad Synaptics - ArchWiki).

    gsettings set org.gnome.settings-daemon.plugins.mouse active false

  2. Edit the X11 configuration file for the touchpad.

    sudo gedit /usr/share/X11/xorg.conf.d/50-synaptics.conf

and add your button options under the section with the synaptics driver, like so:

Section "InputClass"
    Identifier "touchpad catchall"
    Driver "synaptics"
    MatchIsTouchpad "on"
    MatchDevicePath "/dev/input/event*"
    Option "TapButton1" "1"
    Option "TapButton2" "3"
    Option "TapButton3" "2"
    Option "HorizTwoFingerScroll" "on"
    Option "VertTwoFingerScroll" "on"
EndSection
share|improve this answer
1  
As of 13.10, /usr/share/X11/xorg.conf.d/50-synaptics.conf warns "DO NOT EDIT THIS FILE, your distribution will likely overwrite it when updating. Copy (and rename) this file into /etc/X11/xorg.conf.d first." –  Firefeather Oct 24 '13 at 15:57
    
Can you help me how to Simulate a middle-click on Lenovo Yoga 2 Pro Synaptics touchpad too? –  rubo77 Jun 20 at 10:11
1  
@Firefeather: Maybe you want your distribution to update it, because it could be, that your distribution finds an even better solution than this. I would just keep in mind to add this again in case the distribution overwrites it –  rubo77 Aug 30 at 23:05

Download synaptiks from the software center.

Open it, then go to Touchpad Configuration >> Tapping.

Set your configuration there, as you would like.

share|improve this answer

You can enable it with the command synclient TapButton3=2 in the terminal, but that seems to get overridden on suspend+resume and after a reboot. I'm also looking for a permanent solution.

--EDIT--

okay, so there's a post where it's explained for xfce located here: http://forum.xfce.org/viewtopic.php?id=7008

However, unity-2d (and I suppose also unity) likes to fiddle with these settings on resume, and I have no idea how to disable that. maybe it's utouch, I don't really know.

The bottom line is that there is a way to configuring middle click permanently:

  • add a custom startup application (under the 'gear' menu in unity on the top right) with any name you like, e.g. "touchpad tweak" and the command sh -c "/usr/bin/synclient TapButton3=2", then save it.

This is well and good until you suspend and resume. for that:

  • Open a terminal, and type gksudo gedit /etc/pm/sleep.d/80-synaptics-three-finger
  • Copy and paste the following text into the file:

    #!/bin/sh
    
    # Restore three finger tapping
    
    case "$1" in
            resume|thaw)
                    sleep 5;
                    /bin/su YOUR_USER_NAME -c "/usr/bin/synclient TapButton3=2"
                    ;;
    esac
    
  • Replace YOUR_USER_NAME with your login name - not the long one; e.g. use 'fred' instead of 'fred fuchs'. if you don't remember it, you can always type whoami in a terminal window and it'll tell you.

  • Save the file.

  • Make it executable; simply type sudo chmod +x /etc/pm/sleep.d/80-synaptics-three-finger in the terminal window. it will ask for your password.

If you did all this correctly, your system should retain three finger clicking as middle click after a suspend/resume cycle.

Now that was fun and user-friendly, wasn't it? I can only wonder why unity silently meddles with synclient settings and wonder even more why there isn't a simple gui tool to configure all of this. anyway, there you have it.

share|improve this answer
    
Why did this get a downvote? –  kzh Jul 15 '12 at 20:01
    
The suspend/resume task is something i've been needing to do for a while. Thanks! –  tucuxi Sep 14 '12 at 11:10
    
@kzh: maybe because of my sarcastic tone. or could be because it's better to put it in the xorg.conf (at the end if there's already one) like so: Section "Inputclass" Identifier "touchpad catchall" Driver "synaptics" MatchIsTouchpad "on" Option "TapButton3" "2" EndSection –  bamdad Sep 16 '12 at 22:19
    
sorry, the comment form ate my line breaks. you get the point, hopefully. :) in case not, i'll edit my original answer. –  bamdad Sep 16 '12 at 22:26

Check this. http://forums.debian.net/viewtopic.php?p=354960#p354960 I have put on startup

xinput set-int-prop 'SynPS/2 Synaptics TouchPad' "Synaptics Tap Action" 8 0 0 0 0 1 3 2
share|improve this answer
synclient ClickFinger3=2
synclient TapButton3=2

To show the list of actual values:

synclient -l

hope it helps (it did for me!)

share|improve this answer

Touchpad has different settings for taps at the corners, and if you tap at the bottom right corner it does Right click. But if you tap at the top right corner it does Middle click. This is the default setting.

simple bro works for me :)

share|improve this answer
1  
How would one configure this? How do you it's the default setting on his computer? –  Whaaaaaat Oct 5 at 21:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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