How to Set Up Desktop Gestures with Cinnamon Desktop on Linux Mint

Categories:
3 minute read
How to Set Up Desktop Gestures with Cinnamon Desktop on Linux Mint
Touchpad and touch screen gestures can significantly enhance your Linux Mint experience by providing intuitive ways to navigate and control your desktop environment. This comprehensive guide will walk you through setting up and customizing gestures in Cinnamon Desktop.
Understanding Desktop Gestures
Gesture support in Cinnamon includes:
- Touchpad gestures
- Touch screen gestures
- Edge swipes
- Multi-finger gestures
- Pinch-to-zoom
- Custom gesture configurations
Basic Gesture Setup
Enabling Gesture Support
- Install required packages:
sudo apt install xdotool wmctrl libinput-tools
sudo apt install python3-pip
pip3 install gestures
- Configure libinput:
sudo gpasswd -a $USER input
Basic Touchpad Configuration
Access touchpad settings:
- Open System Settings
- Navigate to “Mouse and Touchpad”
- Select “Touchpad” tab
Enable basic gestures:
- Two-finger scrolling
- Tap-to-click
- Natural scrolling
- Edge scrolling
Advanced Gesture Configuration
Installing Gesture Management Tools
- Install Fusuma:
sudo gem install fusuma
- Create configuration directory:
mkdir -p ~/.config/fusuma
- Basic configuration file:
# ~/.config/fusuma/config.yml
swipe:
3:
left:
command: 'xdotool key alt+Right'
right:
command: 'xdotool key alt+Left'
up:
command: 'xdotool key super'
down:
command: 'xdotool key super'
4:
left:
command: 'xdotool key ctrl+alt+Right'
right:
command: 'xdotool key ctrl+alt+Left'
up:
command: 'xdotool key ctrl+alt+Up'
down:
command: 'xdotool key ctrl+alt+Down'
Custom Gesture Creation
- Configure gesture recognition:
threshold:
swipe: 0.4
pinch: 0.4
interval:
swipe: 0.8
pinch: 0.8
swipe:
3:
begin:
command: 'notify-send "Gesture Started"'
update:
command: 'notify-send "Gesture Updated"'
end:
command: 'notify-send "Gesture Ended"'
- Create custom commands:
#!/bin/bash
# Custom gesture script
case $1 in
"workspace-next")
wmctrl -s $(($(wmctrl -d | grep '*' | cut -d ' ' -f1) + 1))
;;
"workspace-prev")
wmctrl -s $(($(wmctrl -d | grep '*' | cut -d ' ' -f1) - 1))
;;
esac
Touch Screen Configuration
Enable Touch Screen Support
- Check touch screen detection:
xinput list
- Configure touch screen:
# Create touch screen configuration
sudo nano /etc/X11/xorg.conf.d/90-touchscreen.conf
Section "InputClass"
Identifier "Touch Screen"
MatchIsTouchscreen "on"
Option "Tapping" "on"
Option "NaturalScrolling" "on"
EndSection
Touch Screen Gestures
Configure touch actions:
- Single tap
- Long press
- Edge swipes
- Multi-touch gestures
Create touch profiles:
touch:
1:
tap:
command: 'xdotool click 1'
hold:
command: 'xdotool click 3'
2:
tap:
command: 'xdotool click 2'
Gesture Debugging and Testing
Testing Tools
- Install gesture debugging tools:
sudo apt install evtest libinput-tools
- Monitor gesture events:
# Watch gesture events
libinput-debug-events
Troubleshooting
- Check device recognition:
# List input devices
libinput list-devices
- Verify gesture support:
# Check gesture capabilities
libinput debug-events --show-keycodes
Performance Optimization
Resource Management
- Monitor system impact:
# Check gesture daemon resource usage
top -p $(pgrep -d',' fusuma)
- Optimize settings:
- Adjust gesture threshold
- Configure update intervals
- Optimize command execution
System Integration
- Autostart configuration:
# Create autostart entry
mkdir -p ~/.config/autostart
cat > ~/.config/autostart/fusuma.desktop << EOF
[Desktop Entry]
Type=Application
Name=Fusuma
Exec=fusuma
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
EOF
Best Practices
Gesture Organization
Create gesture profiles:
- Work profile
- Gaming profile
- Presentation mode
Profile management:
# Create profile switching script
#!/bin/bash
cp ~/.config/fusuma/profiles/$1.yml ~/.config/fusuma/config.yml
pkill fusuma
fusuma -d
Backup and Recovery
- Save configurations:
# Backup gesture settings
tar -czf gesture-backup.tar.gz ~/.config/fusuma
- Restore settings:
# Restore from backup
tar -xzf gesture-backup.tar.gz -C ~/
Advanced Features
Multi-Monitor Support
- Configure per-monitor gestures:
monitor:
HDMI-1:
swipe:
3:
left:
command: 'custom-monitor-command.sh left'
- Create monitor profiles:
- Different gestures per display
- Context-aware actions
- Display-specific shortcuts
Application-Specific Gestures
- Configure per-application settings:
application:
firefox:
swipe:
2:
left:
command: 'xdotool key alt+Left'
Conclusion
Setting up desktop gestures in Cinnamon requires understanding various components and their interactions. Key points to remember:
- Start with basic gestures
- Test thoroughly
- Create backup configurations
- Monitor system impact
- Regular maintenance
By following this guide, you can create an intuitive gesture-based interface that enhances your desktop experience while maintaining system stability. Remember to:
- Document changes
- Test incrementally
- Keep backups
- Monitor performance
- Regular updates
With proper configuration and maintenance, your gesture setup can provide an efficient and natural way to interact with your desktop environment while maintaining system stability and performance.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.