How to Enable Mac-like Gestures on Ubuntu 20.04

Kaigo
2 min readMay 3, 2020

--

Note: These tools are built for the Xorg display server, which is the default for Ubuntu 20.04. If you’re not sure run ps -e | grep tty and check for xorg.

Install dependencies

sudo apt install python3 python3-gi python-gobject meson xdotool libinput-tools gettext

Add your user to the input group

sudo gpasswd -a $USER input

Install libinput gestures

git clone https://github.com/bulletmark/libinput-gestures.git
cd libinput-gestures
sudo make install
sudo ./libinput-gestures-setup install

Start the software and allow it to run at startup.

libinput-gestures-setup start
libinput-gestures-setup autostart

Next install a UI tool to make adding and editing gestures easier.

git clone https://gitlab.com/cunidev/gestures
cd gestures
meson build --prefix=/usr
ninja -C build
sudo ninja -C build install

Open the new program called ‘gestures’ from your activities menu.

These are the gestures you will need to emulate a mac-like experience.

Next you may notice the workspaces are ontop of each other instead of side-by-side like MacOS. To fix this we will need to install a gnome extension named workspace matrix available here.

  1. Install gnome tweak tools from Ubuntu Software Centre
  2. Run `sudo apt-get install chrome-gnome-shell` (even if you don’t have or use chrome)
  3. Install matrix extension

Now restart your system and you should be able to move workspaces, left and right using the three finger gesture or ctrl+alt + left or right arrows.

Two Finger Swipe in Browser

To get the two finger swipe back in a web browser I recommend using the following plugins.

Chrome

Extra: to get the two finger swipe back in a web browser I recommend using this chrome extension and set the following settings.

Firefox

https://addons.mozilla.org/en-US/firefox/addon/two-finger-history-jump/?src=search

--

--

Kaigo
Kaigo

Written by Kaigo

Just a Software Engineer in London

Responses (10)