Linux has really great device support. With each release, new drivers are added to the kernel. From touch-pads, to wireless cards, and even fingerprint scanners. Unfortunately, even though devices are well supported, the platform lags far behind other operating systems when it comes to modern uses of track-pads, click-pads and the like. For years, Linux users have wanted to have a more modern touch/gesture experience that Mac users enjoy. Many projects have attempted to mimic the Macbook touchpad gestures on Linux but the best, most universal way to get Mac-like touch gestures for laptops is by installing Touchegg. It’s a program that allows users to add individual gestures to the Linux platform.
Touchegg is widely available on most Linux distributions. Here’s how to get it running on your favorite distribution.
sudo apt install touchegg
Debian unfortunately doesn’t have Touchegg in the official software sources. Users looking to get this software running can try to use the Ubuntu package. Do understand that just because Ubuntu and Debian share a base does not mean that the latest DEB file will work. A good alternative is to just compile the source code to use on this distribution.
The Touchegg gesture software is available for installation via the Arch Linux User Repository. To install it, first download the latest snapshot. Then, open a terminal and use the CD command to enter the download directory.
From here, extract the snapshot.
tar zxvf touchegg.tar.gz
Go to ~/Downloads/touchegg with the CD command, and start the package generation process.
cd ~/Downloads/touchegg makepkg
After the package generation finishes, install it to the system with:
sudo pacman -U *.pkg.tar.xz
sudo dnf copr enable mhoeher/multitouch sudo dnf install touchegg
sudo zypper install touchegg
Getting Touchegg working on lesser known distributions is easy, as the developer has left exact instructions on how to compile the source code. Everything needed to grab the latest version of the software is ready for downloading directly from Github. Grab the code, and compile everything.
Configuring The Touch Profile
Touchegg isn’t a GUI tool. Instead, it’s a terminal application that runs in the background, recognizes certain gestures and pipes this to the touchpad. For most users, a GUI isn’t needed, and the software generates a profile automatically. To create a new profile, open up a terminal window and run the Touchegg command. Given that this is the first run of the software, a new profile will generate automatically.
Let the program run for a little while, as it needs to generate a new config. When the configuration setup finishes, press Ctrl + Z to suspend the software.
Though the terminal program is sufficient for most users, a GUI application may be attractive for those looking to customize their own touch gestures. Unfortunately, this graphical tool isn’t as widely available as the terminal tool, and as a result must be compiled from scratch.
Step 1: Make sure that the git tool is installed on your Linux PC. Then, use it to grab the latest version of the source code.
git clone https://github.com/Raffarti/Touchegg-gce.git
Step 2: Install the dependencies that are necessary for Touchegg-Gce to run. On Ubuntu, these dependencies are “build-essential libqt4-dev libx11-6 libx11-dev”. On other distributions, look for dependencies such as these. The names should be similar. Arch users can grab a package from the Aur here.
Step 3: Start the compilation. To install the program system-wide, so that all users may use it, use these build instructions:
mkdir build && cd build qmake .. make && make install
To install the program in the user’s home folder, do:
mkdir build && cd build qmake PREFIX=~/.local .. make && make install
After building, open your application launcher and open “Touchegg GUI”. This will open a simple interface that will allow users to create custom gestures more easily. To create a custom gesture, go to the GUI and find “Gestures”. Inside the gestures area, click the + sign to add a specific application gesture. Alternatively, use the “ALL” function to assign a gesture to the entire system.
Go through the gestures’ list to automatically assign actions to your new gesture. Then, after choosing the exact gesture, go through the actions list to select what the gesture should do. Once everything is configured, click “apply” to save the changes.
Gestures should immediately be usable. If they aren’t, you may need to reboot your Linux PC (or just Touchegg) for everything to work.
Autostarting Touchegg is key to keeping the gestures working. To do this, create a startup entry.
sudo nano touchegg.desktop
Then, paste the following code:
[Desktop Entry] Name=Touchegg GenericName=Touchégg Comment=Touchégg Gestures Manager Exec=/usr/bin/touchegg %u Terminal=false Type=Application Name[it_IT]=touchegg.desktop
Save the file with Ctrl + O.
Update the permissions using Chmod, so that your Linux PC will execute the desktop file. It won’t work without it.
sudo chmod +X touchegg.desktop
Lastly, move the desktop file into the autostart folder.
mv touchegg.desktop ~/.config/autostart