DEV Community

Cover image for Enable Mac Like 3 Finger / 4 Finger Touchpad Gesture on Linux Mint
Shawon Saha
Shawon Saha

Posted on

Enable Mac Like 3 Finger / 4 Finger Touchpad Gesture on Linux Mint

If you're a Linux Mint user and you've always envied the smooth touchpad gestures available on Mac, you're in luck. With the help of a few simple commands, you can enable Mac-like touchpad gestures on your Linux Mint system. In this step-by-step guide, I'll walk you through the process. Let's get started:

Step 1: Grant Input Permission

sudo gpasswd -a $USER input
Enter fullscreen mode Exit fullscreen mode

Step 2: Install Required Packages

sudo apt install python3 python3-setuptools xdotool python3-gi libinput-tools python-gobject
Enter fullscreen mode Exit fullscreen mode

Step 3: Install libinput-tools

sudo apt-get install libinput-tools
Enter fullscreen mode Exit fullscreen mode

Step 4: Restart Your Computer
It's essential to restart your computer after installing the packages to ensure everything takes effect.

⚠️ You have to restart your computer ⚠️

Step 5: Clone libinput-gestures Repository

git clone https://github.com/bulletmark/libinput-gestures.git
Enter fullscreen mode Exit fullscreen mode

Step 6: Navigate to the Cloned Repository

cd libinput-gestures
Enter fullscreen mode Exit fullscreen mode

Step 7: Run the Installation Script

sudo ./libinput-gestures-setup install
Enter fullscreen mode Exit fullscreen mode

Step 8: Autostart libinput-gestures

libinput-gestures-setup autostart start
Enter fullscreen mode Exit fullscreen mode

Step 9: Return to the Parent Directory

cd ..
Enter fullscreen mode Exit fullscreen mode

Step 10: Clone the gestures Repository

git clone https://gitlab.com/cunidev/gestures.git
Enter fullscreen mode Exit fullscreen mode

Step 11: Navigate to the Cloned gestures Repository

cd gestures
Enter fullscreen mode Exit fullscreen mode

Step 12: Check Out a Specific Commit (e46c743a)

git checkout e46c743a
Enter fullscreen mode Exit fullscreen mode

Step 13: Install gestures

sudo python3 setup.py install
Enter fullscreen mode Exit fullscreen mode

Step 14: Return to the Parent Directory

cd ..
Enter fullscreen mode Exit fullscreen mode

Step 15: Create a Configuration File

cd .config
Enter fullscreen mode Exit fullscreen mode
touch libinput-gestures.conf
Enter fullscreen mode Exit fullscreen mode
nano libinput-gestures.conf
Enter fullscreen mode Exit fullscreen mode

Step 16: Paste the following code into Configuration File

# Generated by Gestures 0.2.2  -->  https://gitlab.com/cunidev/gestures
# Manual editing might result in data loss!


# Invalid lines


# Unsupported lines

# Swipe threshold (0-100)
swipe_threshold 0

# Gestures
gesture swipe up 3 xdotool key 0xffe3+0xFFEA+0xFF54
gesture swipe down 3 xdotool key super+d
gesture swipe left 3 xdotool keyup 0xffea
gesture swipe right 3 xdotool keydown 0xffea  + key 0xff09
gesture swipe up 4 xdotool key  0xffea+m
gesture swipe down 4 xdotool key  0xffe9+0xffc1
gesture swipe left 4 xdotool key  super+0xff51
gesture swipe right 4 xdotool key  super+0xff53
gesture pinch out 2 xdotool key  0xffe3+0x002b
gesture pinch in 2 xdotool key  0xffe3+0x002d
Enter fullscreen mode Exit fullscreen mode

Step 17: Save and Exit from nano
Ctrl + o -> Enter Key -> Ctrl + x

Final Step: Open Gestures

Image description

For a list of xdotool key codes for more customized experience, you can refer to this link: https://gitlab.com/cunidev/gestures/-/wikis/xdotool-list-of-key-codes

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay