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!

debian Article's
30 articles in total
Favicon
Fixes for a critical rsync vulnerability (CVE-2024-12084) have been released for Stable/Bookworm, Testing and Unstable....
Favicon
Debian and KDE 6 - WSL - How to install KDE 6 via Debian - Windows 11 - X410 - Linux - 2024 https://www.youtube.com/watch?v=yrtgmwsptVc
Favicon
Comprehensive Guide: Setting Up Gestures on Linux (Debian-Based Distributions)
Favicon
èź©ćź‰ć“æ‰‹æœșäžć†ćƒç°ïŒšćœšćź‰ć“æ‰‹æœș䞊搭ć»ș Rust ćŒ€ć‘çŽŻćąƒ
Favicon
The Importance of Reading Documentation: A Lesson from Nvidia Drivers
Favicon
I changed the arm on my android with Debian no root Linux to the Debian arm my android does wonders now.
Favicon
"Why is it, when something happens, it is always you TWO?"- troubleshooting Bluetooth and Wi-Fi devices on Debian 12
Favicon
Virtualization on Debian with virsh&QEMU&KVM — Installation of virtualization tools and first VM creation
Favicon
The Debian LTS Team is actively working towards ensuring that security fixes made in LTS are also propogated to more recent...
Favicon
OKMX6UL Development Board Debian Filesystem Creation Process (Including Tool Installation, Configuration, and Burning)
Favicon
From Debian to Devuan
Favicon
Debian Outreachy interns selected for the December 2024 round
Favicon
Abilitare SSH root login su Debian Linux Server
Favicon
Calls for bids for DebConf26 have started, please see: https://lists.debian.org/debconf-announce/2024/11/msg00001.html
Favicon
LINUX ÜZERINDE OPERA BROWSER VIDEO OYNATMAMA SORUNU
Favicon
Debian 12 
 is amazing! How to: Create your custom codehouse #6 [Giving Voice to Debian: Wireless Audio Devices configuration]
Favicon
Kicksecure: Hardening Your Linux System’s Security (Debian Morph)
Favicon
Managing Large Debian Repositories with Pulp
Favicon
Debian 12 
 is amazing! How to: Create your custom codehouse #5 [From Console only to Custom Graphical User Interface]
Favicon
Reviving the Remix Mini PC: A Guide to Running ARM-based OS Images
Favicon
Automating Debian Package Update Summaries with Python and Gemini (gemini-1.5-flash)
Favicon
DebConf26 bids: Please get your information in shape soon!
Favicon
Debian 12: NVIDIA Drivers Installation
Favicon
Debian Secure Boot: To be, or not to be, that is the question!
Favicon
Bulk Linux Users Creation
Favicon
Using Timeshift for System's Snapshots and Recovery on Debian 12 via Command Line
Favicon
Streamlining .deb Package Installation on Ubuntu: A Better Way to Manage Downloaded Packages
Favicon
Debian 12 
 is amazing! How to: Create your custom codehouse #4 [Security mechanisms against Network-Based attacks]
Favicon
Debian 12 
 is amazing! How to: Create your custom codehouse #3 [Security mechanisms against malware]
Favicon
Debian 12 
 is amazing! How to: Create your custom codehouse #2 [Installation & Manual Disk Partitioning with LVM]

Featured ones: