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!

ubuntu Article's
30 articles in total
Favicon
Configurar servidor de archivos local con Ubuntu y Samba
Favicon
How to install Jenkins in ubuntu
Favicon
Update WSL Ubuntu password
Favicon
Change keyboard to Spanish distribution on Ubuntu Server
Favicon
How to Automate CI/CD Pipelines with GitHub Actions
Favicon
Critical Section Problem: Process Synchronization
Favicon
Reader Writer Problem: Process Synchronization
Favicon
Protection and Security: Operating System
Favicon
Storage Management: Operating System
Favicon
Getting Cilium to work on Ubuntu Cloud Image
Favicon
Process Management: Operating System
Favicon
KillPy: The Tool to Clean Up Your Python Virtual Environments đŸ§č🐍
Favicon
Introduction to Operating System
Favicon
Comprehensive Guide: Setting Up Gestures on Linux (Debian-Based Distributions)
Favicon
Ubuntu Linux Commands Categorized
Favicon
How to Set Up OpenShift Local (CRC) on Ubuntu: A Developer's Guide
Favicon
Fixing OpenVPN Connection Issues in Ubuntu 24.04
Favicon
How to Install MySQL on Ubuntu
Favicon
How to read ip addr output on Linux
Favicon
Enhancing Outdoor Adventures: How Technology Brings You Closer to Nature
Favicon
Memory Management: Operating System
Favicon
How to Change the Background in Ubuntu Terminal
Favicon
How to Install Wireshark on Ubuntu
Favicon
Process Synchronization and Deadlock: Operating System
Favicon
Implementasi Infrastruktur Jaringan Virtual dengan Protokol OSPF
Favicon
àž§àžŽàž˜àž”àž•àžŽàž”àž•àž±àč‰àž‡àčàž„àž°àžàžłàž«àž™àž”àž„àčˆàžČàč€àžšàž·àč‰àž­àž‡àž•àč‰àž™àžȘàžłàž«àžŁàž±àžšàč€àž‹àžŽàžŁàčŒàžŸàč€àž§àž­àžŁàčŒ DNS àžšàž™ Ubuntu 22.04 LTS àčàžšàžšàž‡àčˆàžČàžą àč†
Favicon
How to Fix No Internet Connection in Digital Ocean's Droplet
Favicon
àžàžČàžŁàž—àžł HTTPS àž”àč‰àž§àžą Certbot àčàž„àž° Nginx àžšàž™ Ubuntu Server
Favicon
Short: User Data file for Ubuntu based AWS ec2 instance with docker and docker compose.
Favicon
How to Change Your Password Securely

Featured ones: