Logo

dev-resources.site

for different kinds of informations.

Comprehensive Guide: Setting Up Gestures on Linux (Debian-Based Distributions)

Published at
1/2/2025
Categories
linux
ubuntu
kalilinux
debian
Author
arjun98k
Categories
4 categories in total
linux
open
ubuntu
open
kalilinux
open
debian
open
Author
8 person written this
arjun98k
open
Comprehensive Guide: Setting Up Gestures on Linux (Debian-Based Distributions)

Comprehensive Guide: Setting Up Gestures on Linux (Debian-Based Distributions)

Date: 2-1-2025

One of the features that Windows and macOS users often miss when transitioning to Linux is the native support for multitouch gestures. Linux distributions like Ubuntu and Kali don’t come with pre-installed gesture support, but this functionality can be achieved with a bit of setup using tools like Touchégg.

In this guide, we’ll walk through setting up multitouch gestures on Linux, step by step, including adding specific gestures for switching applications, managing workspaces, and more.


What is Touchégg?

Touchégg is a multitouch gesture recognizer for Linux that enhances the user experience by allowing you to define custom gestures for various actions, like switching between applications, workspaces, or maximizing windows.


Setting Up Gestures on Linux

Step 1: Install Touchégg

Touchégg can be installed using the following commands:

On Ubuntu/Debian-based systems:

sudo apt update
sudo apt install touchegg
Enter fullscreen mode Exit fullscreen mode

On Kali Linux:

Add the non-free repository if not enabled, then install:

sudo apt update
sudo apt install touchegg
Enter fullscreen mode Exit fullscreen mode

On Fedora-based systems:

Use the package manager:

sudo dnf install touchegg
Enter fullscreen mode Exit fullscreen mode

Step 2: Install Touché for Gesture Control

While Touchégg handles the gesture backend, Touché is a GUI application to manage and configure Touchégg effortlessly.

Install Touché:

sudo apt install touche
Enter fullscreen mode Exit fullscreen mode

Step 3: Configure Touchégg for Custom Gestures

Touchégg uses a configuration file stored at ~/.config/touchegg/touchegg.conf. You can customize this file to define gestures for specific actions.

Default Configuration Location:

Create or edit the configuration file:

mkdir -p ~/.config/touchegg
nano ~/.config/touchegg/touchegg.conf
Enter fullscreen mode Exit fullscreen mode

Step 4: Add Gestures to the Configuration

Here’s an example configuration file that includes gestures for:

  • Switching between applications (Alt+Tab equivalent).
  • Switching workspaces.
  • Maximizing, minimizing, and closing windows.
  • Showing the desktop and GNOME shell overview.

Full Touchégg Configuration File:

<touchégg>
<settings>
    <property name="animation_delay">150</property>
    <property name="action_execute_threshold">20</property>
    <property name="color">auto</property>
</settings>

<application name="All">
    <!-- 3 finger swipe up/down for window maximize/minimize -->
    <gesture type="SWIPE" fingers="3" direction="UP">
        <action type="MAXIMIZE_RESTORE_WINDOW">
            <animate>true</animate>
        </action>
    </gesture>

    <gesture type="SWIPE" fingers="3" direction="DOWN">
        <action type="MINIMIZE_WINDOW">
            <animate>true</animate>
        </action>
    </gesture>

    <!-- 3 finger swipe left/right for workspace switching -->
    <gesture type="SWIPE" fingers="3" direction="LEFT">
        <action type="CHANGE_DESKTOP">
            <direction>next</direction>
            <animate>true</animate>
        </action>
    </gesture>

    <gesture type="SWIPE" fingers="3" direction="RIGHT">
        <action type="CHANGE_DESKTOP">
            <direction>previous</direction>
            <animate>true</animate>
        </action>
    </gesture>

    <!-- 4 finger swipe left/right for application switching -->
    <gesture type="SWIPE" fingers="4" direction="LEFT">
        <action type="SWITCH_APPLICATION">
            <direction>next</direction>
            <animate>true</animate>
        </action>
    </gesture>

    <gesture type="SWIPE" fingers="4" direction="RIGHT">
        <action type="SWITCH_APPLICATION">
            <direction>previous</direction>
            <animate>true</animate>
        </action>
    </gesture>

    <!-- 4 finger pinch for window close -->
    <gesture type="PINCH" fingers="4" direction="IN">
        <action type="CLOSE_WINDOW">
            <animate>true</animate>
            <color>F84A53</color>
        </action>
    </gesture>

    <!-- 4 finger swipe up/down for show desktop/show windows -->
    <gesture type="SWIPE" fingers="4" direction="DOWN">
        <action type="SHOW_DESKTOP">
            <animate>true</animate>
        </action>
    </gesture>

    <gesture type="SWIPE" fingers="4" direction="UP">
        <action type="GNOME_SHELL">
            <action>overview</action>
        </action>
    </gesture>
</application>
</touchégg>
Enter fullscreen mode Exit fullscreen mode

Step 5: Apply the Configuration

Restart Touchégg to apply your changes:

pkill touchegg && touchegg &
Enter fullscreen mode Exit fullscreen mode

Step 6: Test Your Gestures

  1. Switch Applications:

    • 4-finger swipe left: Switch to the next application.
    • 4-finger swipe right: Switch to the previous application.
  2. Manage Windows:

    • 3-finger swipe up: Maximize window.
    • 3-finger swipe down: Minimize window.
  3. Switch Workspaces:

    • 3-finger swipe left: Next workspace.
    • 3-finger swipe right: Previous workspace.
  4. Show Desktop:

    • 4-finger swipe down: Show desktop.
  5. Close Window:

    • 4-finger pinch inward: Close the active window.

Additional Tips and Tricks

Debugging Gesture Issues

If gestures don’t work as expected, verify the following:

  1. Ensure Touchégg is running:
   ps aux | grep touchegg
Enter fullscreen mode Exit fullscreen mode
  1. Check for configuration errors by running Touchégg manually:
   touchegg
Enter fullscreen mode Exit fullscreen mode

Customizing Gestures Further

Touchégg allows extensive customization. You can:

  • Map gestures to keyboard shortcuts.
  • Add application-specific gestures.
  • Fine-tune animation speed and thresholds.

You're right to double-check! Here's a complete recap of all the necessary steps to ensure everything works smoothly. I'll verify I haven't missed anything:


Complete Steps

  1. Install Touchégg:
    • Ensure Touchégg is installed.
   sudo apt update
   sudo apt install touchegg
Enter fullscreen mode Exit fullscreen mode
  1. Create/Update the Configuration File:

    • If the ~/.config/touchegg/touchegg.conf file doesn't exist, create it:
     mkdir -p ~/.config/touchegg
     nano ~/.config/touchegg/touchegg.conf
    
  • Paste the updated configuration (provided in my previous response).
  1. Set Permissions for the Configuration File:

    • Ensure the configuration file has proper read/write permissions:
     chmod 644 ~/.config/touchegg/touchegg.conf
    
  2. Restart Touchégg:

    • Restart Touchégg to apply the configuration:
     pkill touchegg && touchegg &
    
  3. Autostart Touchégg on Login (Optional but Recommended):

    • Create a .desktop file to start Touchégg on login:
     mkdir -p ~/.config/autostart
     nano ~/.config/autostart/touchegg.desktop
    
  • Add the following content:

     [Desktop Entry]
     Type=Application
     Exec=touchegg
     Hidden=false
     NoDisplay=false
     X-GNOME-Autostart-enabled=true
     Name=Touchégg
     Comment=Multitouch gesture recognizer
    
  1. Install Touché UI (Optional for Easy Configuration):

    • If you want a GUI to tweak gestures:
     sudo apt install touche
     touche
    
  2. Verify Dependencies (Just in Case):

    • Ensure you have dependencies like libinput for gesture support:
     sudo apt install xdotool wmctrl libinput-tools
    
  3. Test the Gestures:

    • Try all gestures you’ve configured (maximize, minimize, workspace switching, application switching, etc.).
  4. Check Logs for Debugging (if Issues Occur):

    • If gestures aren’t working, check logs:
     journalctl --user-unit=touchegg
    

Common Issues to Address

  • Touchpad Support: Ensure your touchpad supports multi-touch gestures. Use this command to verify:
  libinput list-devices
Enter fullscreen mode Exit fullscreen mode

Look for multi-touch support in the output.

  • GNOME Environment Adjustments: If you're using GNOME, it may have conflicting gestures. You can use gnome-tweaks to disable GNOME's built-in gestures if needed.

  • Animation Issues: If animations aren't working, try setting <animate>false</animate> for the gesture actions.


Let me know if anything still seems off or if you'd like clarification on a specific step!

Conclusion

Adding gesture support to Linux enhances productivity and bridges the gap for users transitioning from Windows or macOS. Tools like Touchégg and Touché make it easy to define gestures for multitasking, workspace management, and more.

By following this guide, you’ll transform your Linux experience with intuitive multitouch gestures that rival native solutions on other operating systems.

Let us know how gestures improve your workflow or share your custom configurations in the comments!

kalilinux Article's
30 articles in total
Favicon
Comprehensive Guide: Setting Up Gestures on Linux (Debian-Based Distributions)
Favicon
Master Password Attacks in Minutes! Ethical Hacking Guide 🔓
Favicon
How Hackers Use SS7
Favicon
Endpoint Security Bypass EXPOSED! Hackers Don't Want You to Know This!
Favicon
How to Set Up an Access Point with a Fake Captive Portal
Favicon
Kali Linux Basics: Your Gateway to Ethical Hacking
Favicon
Instalar BeEF en Kali Linux 2024
Favicon
Happy birthday #linux
Favicon
Linux OS & Basic Commands
Favicon
Getting Started with Kali Linux A Beginners Guide
Favicon
Kali Linux For Beginner
Favicon
Is Your PC Safe? How to Block Password Unlockers Like Chntpw in 2024💻🔐
Favicon
Automatically Change IP Address تغير اي بي بشكل تلقائي كالي لينكس
Favicon
Manage Those Users
Favicon
What is File Manipulation?
Favicon
Installing Essential Software on Kali Linux: Browsers, Office Suite, Code Editors, and More
Favicon
How to Change Linux Password Quickly and Easily
Favicon
Advance Free Debugger
Favicon
Hack WiFi using Kali Linux
Favicon
[Help me] Linux in the Virtual Machine
Favicon
Web simulation of Kali Linux
Favicon
Is hacking only done in Linux?
Favicon
Install Kali Linux 2022.2 On Your Android Device
Favicon
How to Install VirtualBox on Kali OS(2022)
Favicon
KALI LINUX: Common Commands that you should know : PART ONE
Favicon
Setting up and Using BloodHound in Kali Linux
Favicon
Configuring AWS EFS to work with Kali Linux running on AWS EC2
Favicon
Black-Tool
Favicon
How to vs code in Kali linux
Favicon
How to install nuclei in any linux ☠️

Featured ones: