I want to switch between workspaces on my Ubuntu 16.04LTS with a swipe on my touch pad. I read some questions and answers here to find a solution before asking. but there is no horizontal scrolling option like in this answer and no touchpad listed in dconf editor like in this answer. Now I can use my touchpad to two finger vertical scrolling. What is the problem with my touchpad? Is it not recognized correctly?
Easystroke can be configured to do what you want. Install it via Synaptic.
See http://easystroke.sourceforge.net for some more details. (In the Ubuntu deb example, change karmic to raring).
Tested and working on Ubuntu LTS 16.04 on a HP 14 Pavilion Laptop.
I could not for the life of me get touchegg to work on my HP 14 laptop running 16.04 LTS.
You will also need to disable the built in multi finger gestures that come with the Unity desktop. Credit where it's due - this answer from another post recommends installing the dconf-editor package and disabling the gestures using the GUI.
sudo apt-get install dconf-editor dconf-editor
After having lots of problems with the preinstalled synaptics input server I threw it out and replaced it with the libinput library and haven't looked back! No problems to report thus far.
By following this guide you will:
- produce an environment that allows for 3 finger swiping between work spaces (akin to the Mac OS way)
- configure virtual desktop layout to be 1x4 instead of 2x2 (meaning you swipe only left and right between workspaces instead of up and down)
- replace preinstalled synaptics with libinput on your Ubuntu installation
Many steps are copied from this guide.
Step by step instructions
Replace existing synaptics library with vastly superior libinput:
sudo apt remove xserver-xorg-input-synaptics-hwe-16.04 sudo apt install xserver-xorg-input-libinput-hwe-16.04
Optional: enable two finger tapping as click by editing the touchpad section of your 60-libinput.conf (or 40-libinput.conf, etc. the filename may differ on your system) file by adding the
Option "Tapping" "True" line:
sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf Section "InputClass" Identifier "libinput touchpad catchall" MatchIsTouchpad "on" MatchDevicePath "/dev/input/event*" Driver "libinput" Option "Tapping" "True" EndSection
git clone http://github.com/bulletmark/libinput-gestures cd libinput-gestures sudo make install
Install dependencies, add $USER to input group so that they can read input from touchpad, and autostart libinput-gestures program on login
sudo apt-get install libinput-tools xdotool sudo gpasswd -a $USER input libinput-gestures-setup autostart
~/.config/libinput-gestures.conf to add gesture support (example includes shortcuts for hiding desktop and showing windows, also akin to Mac OS defaults):
nano ~/.config/libinput-gestures.conf # Move to workspace left/right gesture swipe left 3 xdotool key ctrl+alt+Left gesture swipe right 3 xdotool key ctrl+alt+Right # Spreads all windows in all workspaces + Show/Hide desktop gesture swipe up 3 xdotool key shift+super+w gesture swipe down 3 xdotool key ctrl+super+d
And finally, edit the virtual desktop layout to be 1x4 instead of 2x2 (so all virtual desktops are in a single horizontal line)
dconf write /org/compiz/profiles/unity/plugins/core/vsize 1 dconf write /org/compiz/profiles/unity/plugins/core/hsize 4
After logging out and then in (try rebooting if this fails) you now have multi gesture support and a work environment that mimics the Mac OS X defaults! Congrats!