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?
4 Answers
Dont know about unity but you can do in Gnome, move your cursor over the dash/launcher , swipe with 2 finger boom workspaces switch instantly.
Cheers
Place the mouse pointer over the "Show Applications" icon at botttom left of screen and then do :
- 2-finger swipe Up/Down on touchpad OR
- scroll the mouse wheel up/down
That would switch you up/down between your desktops.
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).
-
1
-
-
Did you install Easystroke? Please review the Docs and the Tip sections at github.com/thjaeger/easystroke/wiki. After defining the gestures, I set the Gesture Button to button 3, in the prefs. This way you either hold the right mouse button whilst making the desired gesture, or the right button on the pad to do the same.– heynnemaAug 3, 2016 at 13:17
Tested and working on Ubuntu LTS 16.04 on a HP 14 Pavilion Laptop.
Some common tools used to achieve multi gesture support are touchegg, xdotool, and fusuma although I had success only with libinput-gestures (which itself requires xdotool).
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
Install libinput-gestures
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
Edit ~/.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!
-
Note - a previous version of this answer recommended touchegg but it conflicted with other parts of my distro and hardware and ended up not properly working. Apologies to anyone who tried to use touchegg to no avail. Feb 26, 2018 at 6:59