This tutorial shows how to enable (or improve) touchpad gestures in Ubuntu 24.04, Ubuntu 22.04. Not only for the default GNOME (both X & Wayland), but also for XFCE, MATE, and other desktop environments.
GNOME introduced multi-touch gestures support since v40, however, it only works on the default Wayland session, and supports only 3 finger swipe gestures. For more gestures, GNOME on Xorg, and other desktop environments, you can choose either option below:
- Gesture Improvements extension (GNOME only) – enable 4-finger swipe and pinch gestures, support both Xorg and Wayland.
- Touchegg – for all desktop environments on X, including GNOME on Xorg, but not for Wayland.
Option 1: Use Extension for GNOME on both Wayland and Xorg
For the default GNOME Desktop from version 40 to 46, there’s an extension to improve the default multi-touch gestures on Wayland, and/or enable the feature for the classic Xorg session.
With the extension, your Ubuntu (or other Linux with GNOME) allows to:
- use 4-finger swipe left/right to switch workspace.
- 4-finger swipe up/down to cycle between Overview, App Grid, and Desktop.
- 3-finger swipe left/right to switch between app windows (function like Alt+Tab).
- 3-finger swipe up/down to maximize, restore, minimize current app window.
- 3 or 4 finger pinch out to show desktop, pinch in to restore.
- Application specific keyboard shortcut based hold-swipe gestures
- Configure touchpad swipe (and pinch) speed.
Step 1: Install the Extension
For Ubuntu 22.04, first search for and install “Extension Manager” from Ubuntu Software.
Then, launch “Extension Manager”, and use it to search & install “Gesture Improvements” extension under Browse tab.
Tips: You may need to make a switch of the filter (e.g., “Recent”, “Downloads”), or the app does not work properly.
If you’re on the default Wayland session, just switch back to “Installed” tab in the app window, and click setting icon for the new installed extension, and configure multi-touch gestures as you want.
For Ubuntu 24.04 with default GNOME 46, the extension is so far not updated for the desktop. There’s however a fork on Github to make it work on GNOME 46.
Just go to the link page below, and select download the source package “[email protected]“:
Then, open file manager and extract the Zip archive. Finally, copy or move the extracted folder to .local/share/gnome-shell/extensions
directory.
Tips: .local
is a hidden folder, press Ctrl+H to view/hide it. And, create extensions
sub-folder under .local/share/gnome-shell
if it does not exist.
When done, log out and back in.
Finally, use Extension Manager (install it from App Center filtered by “Debian package”) to enable and configure the extension for improved gestures.
Step 2: Enable for GNOME on Xorg
If you’re on the classic Xorg session, then you have to install the daemon package to make the touchpad gestures work for you.
1. First, go to the github releases page to download the source package (.zip file):
2. Then, extract the archive in your Downloads folder. Right-click on the extracted folder and select “Open in Terminal” to open up a terminal window with that folder as working directory.
3. In the pop-up terminal window, run ls
command to list the directory content. It should include a service file, install/uninstall script, and a “target” sub-folder.
To install the daemon, just run the installer script via command:
sh install.sh
Also grant permission by adding current user to the “input” group:
sudo gpasswd --add $USER input
If everything’s done without any error, restart computer. The extension then will make multi-touch gestures work for GNOME on Xorg session.
Option 2: Use Touchegg
Touchegg is a free open-source tool that can enable multi-touch gestures in both global and per-app basis. It works on all Linux desktop, though not for Wayland.
Different to GNOME’s built-in gestures, touchegg is more flexible!
It allows to manually choose actions for 3- and 4-finger swipe, and 2-, 3-, and 4 finger pinch gestures, including:
- Maximize or restore a window.
- Minimize a window.
- Tile a window.
- Toggle full-screen mode.
- Close window.
- Switch Desktop (workspace).
- Show Desktop.
- Do mouse click.
Or, simulate a keyboard shortcut and execute custom command for the gesture you make on your touchpad or touchscreen. Also, it supports for changing 2-, 3-, and 4-finger tap actions.
1. Install Touchegg
Touchegg is available in system repository for all current Ubuntu releases, as well as old Ubuntu 18.04, Ubuntu 16.04, and even Ubuntu 14.04.
The system package however does not work in my case in Ubuntu 24.04 GNOME Xorg. If you want to try it out, open terminal (Ctrl+Alt+T
) and run command to install:
sudo apt install touchegg
For Ubuntu 20.04, Ubuntu 22.04, and Ubuntu 24.04 on amd64
and arm64/armhf
platforms, the latest version of the software package is available to install via its official PPA.
- First, press Ctrl+Alt+T to open up a terminal window. Then run command to add the PPA:
sudo add-apt-repository ppa:touchegg/stable
Type user password (no asterisk feedback, just type in mind) when it asks to authenticate, then hit Enter to continue.
- After that, run command to install the daemon package:
sudo apt install touchegg
NOTE: Elementary OS 6+, Zorin OS 16+, Pop!_OS 21.04+ and Linux Mint 21.2+ include Touchegg out-of-the-box. Just enable it from Settings.
2. Enable Touchegg Service
After installed the latest package from PPA, you may run command to verify if the daemon is in active running:
systemctl status touchegg.service
If NOT, try systemctl enable touchegg && systemctl start touchegg
to enable it.
If you installed the package from system repository, then there’s no systemd service. Just try running touchegg
command, and leave the terminal window open.
3. Install Touche – the graphical configuration tool
After installed the daemon package and make sure it’s running in background, you can then either configure ~/.config/touchegg/touchegg.conf
file for custom actions (See official document), or use “touche” a graphical tool that’s friendly for beginners.
The tool so far is only available to install as Flatpak package in this page.
1. First, press Ctrl+Alt+T
to open up a terminal window. Then, run command to enable Flatpak support:
sudo apt install flatpak
2. Then, run command to install Touche as Flatpak package:
flatpak install https://dl.flathub.org/repo/appstream/com.github.joseexposito.touche.flatpakref
After installation, search for and start it from start menu or Gnome overview. If the app icon is not visible, either logout and back in, or run flatpak run com.github.joseexposito.touche
command to start from terminal.
When the app opens, enable and configure your desired multi-touch gestures and enjoy!
4. Install Extension for GNOME on Xorg
If you use Touchegg on default GNOME with classic Xorg session, then you need to install an extension to make it function.
For Ubuntu 22.04, Ubuntu 24.04, search for and install “Extension Manager” from either Ubuntu Software or App Center (filtered by “Debian package”). Then, use the tool to search & install “X11 Gestures” extension.
For Ubuntu 20.04 and earlier, first open terminal (Ctrl+Alt+T) and run command to install agent package:
sudo apt install chrome-gnome-shell
Then, go to this web page, install browser extension and refresh if prompted, finally use the ON/OFF switch to install the extension.
Uninstall:
To uninstall all the extensions mentioned in this tutorial, use either GNOME Extensions or Extension Manager.
To uninstall the Touchegg daemon, use command in terminal (Ctrl+Alt+T):
sudo apt remove touchegg
Also run command to remove the PPA:
sudo add-apt-repository --remove ppa:touchegg/stable
For the touche configuration tool, run the command below to uninstall:
flatpak uninstall --delete-data com.github.joseexposito.touche
Command to remove the PPA should be:
sudo add-apt-repository –remove ppa:touchegg/stable
;)