Touchpad gesture setup on Elementary OS and other Linux Distro

Previously, I have shown you how to make your elementary os look more beautiful. This time, let’s customize the touchpad gesture so that it will behave even more like mac os.

We are going to use the following tools:

  1. libinput-tools
  2. libinput-gestures
  3. gesture

Step 1: Add user to group “input”

First, you need to add your user to belong to the input group, so that it can access the touchpad input. Open your terminal, and enter the following command:

sudo gpasswd -a $USER input

You need to reboot or log in to successfully assign your user to the group. But here I have a short command to make it work without log out or reboot:

su - ${USER}

Enter your current user password, and done.

Step 2: Install libinput-tools

It is a library that handles input devices for display servers and other applications that need to directly deal with input devices. Enter the below command:

sudo apt update
sudo apt install libinput-tools

Step 3: Install libinput-gestures

It is a utility that reads libinput gestures from your touchpad and maps them to gestures you configure in a configuration file. It uses xdotool command to perform the action.

Currently, there is no repository, you can only install it from the source. Copy and paste the below command one by one:

git clone https://github.com/bulletmark/libinput-gestures.git ~/libinput-gesturescd ~/libinput-gesturessudo make install (or sudo ./libinput-gestures-setup install)

If you do not have git installed, simply run the following command, then run the above command again:

sudo apt install git

You also need to set it to auto-start when you log in:

libinput-gestures-setup autostartlibinput-gestures-setup start
libinput-gestures

Step 4: Install gesture

Gesture is a GUI for configuration libinput-gestures instead of configuring in the text file. To install gesture, follow the below commands:

sudo apt install python3 python3-setuptools xdotool python3-gi libinput-tools python-gobjectgit clone https://gitlab.com/cunidev/gestures ~/gesturescd ~/gesturessudo python3 setup.py install

Open Gesture app, and add a new gesture you want. Here is my gesture setup:

Gesture Setup

Simply reboot your computer once to make sure it works well. You can play with other gestures.

And Done, enjoy your new smooth gestures with just 4 steps.

This method can be used with other Ubuntu, Linux Mint, or Other Linux distro.

Link Reference: Customize Linux Touchpad Gestures with ‘Gestures’ App

Slothman shares what he cares

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store