Unlock Multi-Touch Gestures in Xubuntu

Multi-touch gestures are one of my favorite modern desktop features. By disabling Synaptics driver and installing Touchégg, you can bring gestures to Xubuntu.

Unlock Multi-Touch Gestures in Xubuntu

One of the features I’ve grown to appreciate since using macOS, elementary OS, and GNOME 4x is multi-touch gestures for switching workspaces. When I came back to Xubuntu, I ran into some roadblocks bringing my favorite feature into Xfce. By disabling the Synaptics driver and installing Touchégg, you can bring Magic Trackpad support and gestures to Xubuntu.

Replacing Synaptics with libinput

Xubuntu ships with the Synaptics driver for improved laptop touchpad support. Synaptics is an X11 input driver specifically for touchpad support, but it directly interferes with libinput in Xfce. libinput is a Wayland- and X11-compatible input driver with improved touchpad support and is a key component for Touchégg. If Synaptics is present, it takes precedence over libinput, so it has to be removed to continue.

An additional benefit of removing Synaptics: it doesn’t support the Apple Magic Trackpad 2 at all. When it’s installed, you cannot move your cursor. You can only right-click. Uninstall Synaptics to make the Magic Trackpad work in Xubuntu!

Uninstall Synaptics

Removing the driver is trivially easy. Open up a terminal and issue the following command:

sudo apt remove xserver-xorg-input-synaptics

After removing the driver, restart your system. Once you’re up and running, your touchpad should have a bit more life in it! With the Synaptics driver out of the way, libinput will be able to take over and enable Touchégg.

Reinstall Synaptics (if needed)

If for some reason you need to reinstall the Synaptics driver, just enter the following into your terminal and then reboot. Synaptics will be reinstalled, but Touchégg will not function correctly.

sudo apt install xserver-xorg-input-synaptics

Install Touchégg for Multi-Touch Gestures

Touchégg runs in the background and translates touchpad gestures into actions. Once configured, you will be able to use three- or four-finger gestures to switch workspaces, resize or rearrange windows, or even run custom commands.

To install Touchégg on Xubuntu, follow the Ubuntu instructions below. Note that you will find touchegg in the Ubuntu repositories, but it is an older version and won’t behave as expected.

sudo add-apt-repository ppa:touchegg/stable
sudo apt update
sudo apt install touchegg

Restart your computer and the touchegg daemon will be running in the background.

Install Touché to Configure Touchégg

Touché has an easy-to-understand interface, with options for Swipe, Pinch, and Tap gestures.

Touché is the desktop companion application to configure Touchégg. It’s available on FlatHub so the next step will be to enable Flatpak on Xubuntu. We’re doing it all, right here, right now.

Install Flatpak support in Xubuntu

Following the Ubuntu setup instructions on flathub.org, run the following commands in a Terminal.

# Install Flatpak
sudo apt install flatpak

# Install the GNOME Software Flatpak plugin (optional)
sudo apt install gnome-software-plugin-flatpak

# Add the Flathub repository
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Restart your computer once again and you’ll be ready to install Flatpaks.

Install Touché from Flathub

Final step! Click the Install button on Flathub or install from the Terminal:

flatpak install flathub com.github.joseexposito.touche

Configure Your Touchpad Gestures

You’ll find Touché in the application menu. Launch it and add your global and per-application gestures! Remember that Xubuntu is configured with a single workspace, so gestures to Switch desktop will fail until you add some additional workspaces. You can do this from Xubuntu’s Workspaces settings.

From the Workspaces application, you can add however many workspaces you want. Go wild!

Wrapping Up

I’m finally getting back into Xubuntu and Xfce development after roughly a year’s hiatus. Adding the multi-touch workspace gestures makes the transition much smoother. I hope this guide is helpful for others wanting to use Xubuntu but hesitant to without their modern desktop features. Look forward to more updates in the near future!