How to disable right click on the touchpad

Solution 1:

Run synclient -l to show your Synaptics trackpad configuration. At the end of the output, you will find something like

RightButtonAreaLeft     = 3068
RightButtonAreaRight    = 0
RightButtonAreaTop      = 4326
RightButtonAreaBottom   = 0

These values have to be changed to zero by typing these two commands:

synclient RightButtonAreaLeft=0 and synclient RightButtonAreaTop=0

Clicking anywhere on your trackpad with a single finger will now always trigger a left-click. To right-click, do a two-finger click anywhere on your trackpad. Be aware that the new settings will be lost everytime you reboot or relog.

Making the custom trackpad settings permanent in Unity

To make the new settings permanent, write the two commands to a shell script and add the script to your startup applications:

nano ~/.synaptics-custom-settings.sh

Paste the code below into the shell script, exit the editor with Ctrl + X, and confirm the saving dialogue with Y.

#!/bin/bash
synclient RightButtonAreaLeft=0
synclient RightButtonAreaTop=0

Make the shell script executable:

chmod a+rx ~/.synaptics-custom-settings.sh

Open the Startup Applications program in Unity and add ~/.synaptics-custom-settings.sh to the list of startup applications. This way, the custom trackpad settings will be applied automatically every time you log in.

Source: http://kernpanik.com/geekstuff/2015/01/12/disable-rightclick-synaptics.html

Solution 2:

On Ubuntu 20.04 there is no /usr/share/X11/xorg.conf.d/50-synaptics.conf. Instead you can use GNOME Tweak tool. Install it with sudo apt install gnome-tweak-tool and then you can switch the mouse touchpad mode:

enter image description here

Selecting the option "Fingers" worked for me. Then right clicking with one tap is disabled but can still be done with tapping with 2 fingers.

Source: https://itsfoss.com/fix-right-click-touchpad-ubuntu/

Solution 3:

For reasons I don't understand it seems that Helio's answer only sometimes worked for me. Various other threads have made me think there is some conflict between different config files. Anyway, here's a quick solution that worked for me. Might help someone else:

Edit /usr/share/X11/xorg.conf.d/50-synaptics.conf

And comment out the option in this part:

# This option enables the bottom right corner to be a right button on
# non-synaptics clickpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Default clickpad buttons"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
#       To disable the bottom edge area so the buttons only work as buttons,
#       not for movement, set the AreaBottomEdge
#       Option "AreaBottomEdge" "82%"
EndSection

Like this:

# This option enables the bottom right corner to be a right button on
# non-synaptics clickpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Default clickpad buttons"
        MatchDriver "synaptics"
#        Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
#       To disable the bottom edge area so the buttons only work as buttons,
#       not for movement, set the AreaBottomEdge
#       Option "AreaBottomEdge" "82%"
EndSection