Enabling Middle Click / Right Click for touchpad in Ubuntu

NOTE: This method works but you have to do it each time when you log on. The new fix is posted here:

*************************************************************

 

fotolia_109541_XS

To configure Middle click with two finger tapping on the touchpad and Right click with three finger tapping on the touchpad:

Shortest and Easiest way:
Go to Terminal, and type the three following codes one by one.

sudo echo "synclient TapButton2=2 && synclient TapButton3=3" > /etc/touchpad_settings.sh
sudo chmod +x /etc/touchpad_settings.sh
gsettings set org.gnome.settings-daemon.peripherals.input-devices hotplug-command "/etc/touchpad_settings.sh"

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

Detailed way with Explanation:
Go to Terminal, and type

sudo gedit /etc/touchpad_settings.sh

Paste the following code in gedit

synclient TapButton2=2 TapButton3=3

Save it and close it.

Come back to terminal and type

sudo chmod +x /etc/touchpad_settings.sh
gsettings set org.gnome.settings-daemon.peripherals.input-devices hotplug-command "/etc/touchpad_settings.sh"

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

Explanation:
This just about creating an executable script to enable two finger tapping for middle click and three finger tapping for right click. Then making the script persistant so that it remains there after you logout and login again, or restart your computer.

The first code creates the script file in “/etc” folder and opens the text editor called “gedit” to type your code.
You can put in anywhere you want for example at your home folder “~/touchpad_settings.sh” instead of “/etc/touchpad_settings.sh“, but you have to mention the exact same location of the script at the upcoming codes accordingly.

The code you paste in gedit actually enables two finger tapping as middle click and three finger tapping as right click on touchpad. If you want two finger tapping as right click and three finger tapping as middle click, use the following code instead of that one.

synclient TapButton2=3 TapButton3=2

Then after saving and closing, the next code makes the script executable with “chmod +x” command. Don’t forget to use the acutal path if you place the “touchpad_settings.sh” file elsewhere.

The next command makes the script persistant, i have no idea how the last code works.

Thanks to this post: http://askubuntu.com/questions/130393/how-to-configure-the-touchpad-middle-click
and this post: http://tombuntu.com/index.php/2011/11/06/persistent-touchpad-configuration-in-ubuntu-11-10/

2 responses to “Enabling Middle Click / Right Click for touchpad in Ubuntu

  1. Pingback: Enabling Two finger tap as middle click in Ubuntu | Quak Quaks of the Ugly Duckling·

  2. Pingback: How to enable two finger scrolling in cinnamon | Quak Quaks of the Ugly Duckling·

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s