macOS-like touchpad gestures for Ubuntu 24.04 GNOME on X11 using Fusuma and xdotool.
This setup is aimed at people who want Linux touchpad behavior closer to macOS, especially:
- three-finger drag
- four-finger workspace switching
- two-finger pinch zoom
- normal GNOME tap/click/scroll behavior left intact
This repo reflects a working setup on:
- Ubuntu 24.04.4 LTS
- GNOME on X11
fusuma 3.7.0libinput 1.25.0xdotool 3.20160805.1
Touchpad hardware on the original machine:
MSNB0001:00 04CA:2642 Touchpad- event node:
/dev/input/event4
The event node is hardware-specific. You should verify yours with:
libinput list-devices- fusuma/config.yml: Fusuma gesture mapping
- scripts/fusuma-drag-lock.sh: three-finger drag helper
- autostart/fusuma.desktop: GNOME autostart entry
The default Linux touchpad stack can get close to macOS for scrolling and taps, but three-finger drag usually needs custom gesture tooling.
The main bug fixed in this setup was drag jitter. A naive drag helper rounds each tiny gesture delta immediately. That creates visible stutter:
- small movements get rounded to
0 - pointer motion pauses briefly
- the cursor jumps once enough movement accumulates
The helper in this repo stores the fractional remainder between updates and only emits integer pointer motion once enough real movement has accumulated. That makes three-finger drag much closer to normal click-and-drag smoothness.
- Install dependencies.
- Add your user to the
inputgroup. - Apply the GNOME touchpad settings.
- Copy the repo files into the expected paths.
- Start
fusuma.
Detailed commands are included below.
sudo apt update
sudo apt install -y libinput-tools ruby ruby-dev xdotool
sudo gem install fusumaAdd your user to the input group:
sudo gpasswd -a "$USER" inputLog out and back in after that group change.
gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true
gsettings set org.gnome.desktop.peripherals.touchpad natural-scroll true
gsettings set org.gnome.desktop.peripherals.touchpad click-method 'fingers'
gsettings set org.gnome.desktop.peripherals.touchpad two-finger-scrolling-enabled true
gsettings set org.gnome.desktop.peripherals.touchpad tap-and-drag true
gsettings set org.gnome.desktop.peripherals.touchpad tap-and-drag-lock falseCopy the files into place:
mkdir -p ~/.config/fusuma ~/.config/autostart ~/.local/bin
cp fusuma/config.yml ~/.config/fusuma/config.yml
cp scripts/fusuma-drag-lock.sh ~/.local/bin/fusuma-drag-lock
cp autostart/fusuma.desktop ~/.config/autostart/fusuma.desktop
chmod +x ~/.local/bin/fusuma-drag-lockIf your touchpad is not /dev/input/event4, override it before starting Fusuma:
export FUSUMA_DRAG_LOCK_DEVICE=/dev/input/eventXpkill -x -f fusuma || true
nohup fusuma -d >/tmp/fusuma.log 2>&1 &To load it automatically on login, keep the desktop file in:
~/.config/autostart/fusuma.desktopThese were the relevant GNOME touchpad values on the original working machine:
org.gnome.desktop.peripherals.touchpad click-method 'fingers'
org.gnome.desktop.peripherals.touchpad natural-scroll true
org.gnome.desktop.peripherals.touchpad tap-and-drag true
org.gnome.desktop.peripherals.touchpad tap-and-drag-lock false
org.gnome.desktop.peripherals.touchpad tap-to-click true
org.gnome.desktop.peripherals.touchpad two-finger-scrolling-enabled true
- This repo is for X11. The drag path depends on
xdotool, so this is not the right approach for a pure Wayland session. - If drag feels too fast or too slow, tune
interval,accel, andthresholdinfusuma/config.yml. - If gestures do not trigger at all, confirm that your user is in the
inputgroup and thatfusumacan read libinput gesture events.