A simple bash script to enable two-finger back and forward swipe gestures in Google Chrome on Linux systems.
This script modifies your local Chrome desktop entries to add the --enable-features=TouchpadOverscrollHistoryNavigation flag, which enables touchpad overscroll navigation for back/forward gestures in Chrome.
git clone https://github.com/Angxddeep/enable-chrome-gestures-linux.git
cd enable-chrome-gestures-linux
chmod +x enable-chrome-gestures.shcurl -fsSL https://raw.githubusercontent.com/Angxddeep/enable-chrome-gestures-linux/main/enable-chrome-gestures.sh | bashcurl -O https://raw.githubusercontent.com/Angxddeep/enable-chrome-gestures-linux/main/enable-chrome-gestures.sh
chmod +x enable-chrome-gestures.sh
./enable-chrome-gestures.shThe script will:
- Create the local applications directory if it doesn't exist
- Copy Chrome desktop entries to your local directory
- Modify them to include the gesture enabling flag
- Update the desktop database
- Restart Chrome completely (close all Chrome windows and processes)
- Test the gestures by swiping two fingers left/right on your touchpad
The script patches your Chrome desktop files (.desktop files) to include the experimental flag that enables touchpad-based navigation gestures. This is done locally so it doesn't affect system-wide installations.