How to Enable 3 & 4 Finger Touchpad Gestures in Linux Mint 21 / 20

Photo by Jeremy Bezanger on Unsplash

This simple tutorial is a step by step guide shows how to install and setup multi-touch gestures in Linux Mint in 2 different ways.

GNOME desktop (default in Ubuntu, Fedora, and optional in Debian, Arch etc) now has out-of-box multi-touch gestures since v40. Also, KDE Plasma has the feature in the recent 5.25 release. For Linux Mint users, there are free open-source software to do the job. And, this tutorial will show you how.

Method 1: Use Touchégg

Touchégg is one of popular multi-touch gesture recognizer for Linux desktop. It’s a good choice for beginners, since user don’t have to struggle with any Linux command. Just do mouse clicks as well as few copy & paste actions will make it work in Linux Mint.

Step 1: Install Touchégg

The software is available in Ubuntu system repository. As Ubuntu based system, it’s also available in Linux Mint software manager. But, it’s old! To get the latest release, I’d recommend to use its official Ubuntu PPA.

1.) Firstly, search for and open “Software Sources” from start menu. When it opens, navigate to ‘PPAs’ in left panel, do following steps to add the PPA:

  • Click “Add” button in the bottom to open the dialog.
  • In pop-up dialog, type or paste ppa:touchegg/stable
  • Finally click OK, and confirm in next screen.
Add Touchegg PPA

After adding the PPA, it should prompt to update APT cache via the bottom “OK” button. Just click on it, and done.

Update APT Cache

2.) Next, search for and open “Software Manager” from start menu. When it opens, search for and click install ‘Touchegg’.

It's IMPORTANT to click "Refresh the list of package" option under "☰" (hamburger menu), to avoid installing the old version from Ubuntu repository!

Keep an eye on package version! Depends on your Linux Mint edition, the PPA package usually includes “ubuntu22.04” or “ubuntu20.04” in version number.

Step 2: Install Touché to Customize 3 & 4 finger gestures

After installing Touchégg, it should be running automatically and silently as background service. Now, you need a graphical configuration tool to configure the gestures.

1.) Also, open “Software Manager” from start menu. Search for and install ‘Touché’.

Install Touche

2.) Finally, open ‘Touché’ from start menu. There you can use the ON/OFF switch to turn on the gestures you want to enable, and choose action to do via the drop-down box. Besides 3/4 finger swipe, it also supports for customizing multiple finger pinch and tap actions.

As well, click on bottom left “+” allows to enable touchpad gestures for certain applications.

Configure touchpad gestures
To apply changes, you need to log out and back in or even system restart!

Method 2: Use libinput-gestures

It’s always good to have more choices! Libinput-gestures is another one. It reads libinput gestures from your touchpad and allows to map them to custom actions via xdotool.

1. Install Libinput-gestures

The software is not so beginner friendly. You have to do run some commands in terminal to get things done!

1.) Firstly, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run command to add current user into ‘input’ group:

sudo gpasswd --add $USER input
Add user into group need system restart to make it work, though you can do this when everything is done.

Also, install required libraries by running command:

sudo apt install wmctrl xdotool libinput-tools
Install Required libraries

2.) Next, grab the source code via git command in terminal:

git clone https://github.com/bulletmark/libinput-gestures.git

Run sudo apt install git if you don’t have the git command line tool.

Then navigate to the source folder:

cd libinput-gestures

And, finally install the tool:

sudo ./libinput-gestures-setup install
Download & install Libinput gestures

3.) Finally, make it start automatically in background by running command:

libinput-gestures-setup autostart start
Start libinput gestures

2. Customize touchpad gestures

After installing the software, you can either configure the ‘/etc/libinput-gestures.conf‘ file to customize touchpad gestures.

Or, install and use the graphical ‘Gestures’ tool by searching from “Software Manager” utility:

Install Gestures

Finally, open the tool from start menu, click ‘+‘ and select desired gesture in pop-up dialog.

Unlike touche, you have to input custom command to define what to do for the gesture. For example:

  • xdotool key super+Left / xdotool key super+Right to move and resize window to left/right half of screen.
  • xdotool key super+Up / xdotool key super+Down to maximize, restore window.
  • xdotool key ctrl+alt+Left / xdotool key ctrl+alt+Right to switch workspace.
  • xdotool key super+d to do (or undo) show desktop.

See more about xdotool via man xdotool command, or via its project page.

Configure libinput gestures

Uninstall:

For Touché and Touchégg, just remove them via “Software Manager”. Also, remove the Ubuntu PPA via “Software Sources” tool.

For libinput-gestures, navigate into the source folder (re-download it if you have removed it), and run the setup with uninstall flag by running the commands below one by one in terminal:

git clone https://github.com/bulletmark/libinput-gestures.git

cd libinput-gestures

sudo ./libinput-gestures-setup uninstall

As well, remove the ‘Gestures’ configuration tool using ‘Software Manager’. And, restart computer to apply changes.

Hi, I'm Merilyn Ne, a computer geek working on Ubuntu Linux for many years and would like to write useful tips for beginners. Forgive me for language mistakes. I'm not a native speaker of English.