Ubuntu 16.04 multitouch gestures

90,390

Solution 1

I never succeeded in making it work with touchegg. But there is an easy way to achieve it with another tool. Here are the steps: At first download, compile libinput-gestures and install from git repository:

git clone http://github.com/bulletmark/libinput-gestures
cd libinput-gestures
sudo make install

Make sure libinput-tools and xdotool are installed:

sudo apt install libinput-tools xdotool

Make sure current user is in the input group to have permission to read the touchpad device:

sudo gpasswd -a $USER input  # Log out and back in to assign this group

Start libinput-gestures on every start up:

libinput-gestures-setup autostart

Now you can change your virtual workspace by swiping up an down. If you want to make some custom configuration, you should copy the configuration file to your home folder. You can then change it there.

cp /etc/libinput-gestures.conf ~/.config/libinput-gestures.conf
nano ~/.config/libinput-gestures.conf

Have a look at the git repository for further documentation: https://github.com/bulletmark/libinput-gestures

Don't forget to logout then login to see the changes taking effect.

Solution 2

You might be able to get touch working by disabling the xinput 2FGT gestures and letting gestures bubble to the xserver.

To do this, find out the id of the input method that you want to fix:

xsetwacom list

Then disable processing of gestures of that method using

xsetwacom set (id here) Gesture off

This makes it work for me.

If you want to make these changes permanent beyond reboot, the easiest way is to write the command from above into ~/.xinirc. See here for alternative methods.

Solution 3

libinput-gestures works for my xps15 on ubuntu 16.04.

And I would like to share my configure commands.

gesture swipe up    3 xdotool key ctrl+alt+Up
gesture swipe down  3 xdotool key ctrl+alt+Down
gesture swipe left  3 xdotool key ctrl+alt+Left
gesture swipe right 3 xdotool key ctrl+alt+Right
gesture swipe up 4 xdotool key super+w
gesture swipe down 4 xdotool key ctrl+super+d

Solution 4

Yes.

Firstly you'd wanna check if your touchpad supports multitouch. As written here How can I test to see if my touchpad is supports more than 2 finger gestures?

sudo apt-get update
sudo apt-get install geis-tools
geisview

In the new window, go under DeviceAdded: (Probably the last option) and check device touches: . finger_number will tell you the number of multi-touch fingers your touchpad supports.

Next, install touchegg:

sudo apt install touchegg

Next, go to your home directory.

create a file: .xprofile with the following content :

synclient TapButton2=0
synclient ClickFinger2=0
synclient TapButton3=0
synclient ClickFinger3=0
synclient HorizTwoFingerScroll=0
synclient VertTwoFingerScroll=0
touchegg &

Now restart your computer.

When you login, you should have multitouch support from touchegg. You can configure the file and modify the gestures in

~/.config/touchegg/touchegg.conf

Share:
90,390

Related videos on Youtube

OBrian23
Author by

OBrian23

Updated on September 18, 2022

Comments

  • OBrian23
    OBrian23 over 1 year

    Is it possible to make multitouch gestures on Ubuntu Xenial Xerus? For example with TouchEgg? I tried already but without success.

    • pauljohn32
      pauljohn32 over 7 years
      In answers below, you see bifurcation between answers intended for users of the synaptics touchpad driver and the libinput touchpad driver. Before you follow them, figure out which driver you are using. They are entirely different setups, different config. On way to tell if you have synaptics, run " synclient -l" in a terminal. You know you are probably using libinput if you see this (which I do): "Couldn't find synaptics properties. No synaptics driver loaded?" But it if spews out settings like the touchegg answer below, you know you are in the synaptics category.
    • polynomial_donut
      polynomial_donut over 4 years
      Anybody reading this on 18.04, for my Lenovo x240, installing xserver-xorg-input-synaptics did the trick
  • verpfeilt
    verpfeilt almost 8 years
    Did not test the whole answer yet, but I see on my system that touchegg is not installed by default, it seems. You may add the information to install it with (I guess) sudo apt install touchegg.
  • verpfeilt
    verpfeilt almost 8 years
    Does not work for me. Still figuring out what could be wrong. Maybe I need to disable something in the xinput properties? I have a touch screen and a touch pad on my notebook, is this a problem for using touchegg? Can I specifically give touchegg a device?
  • Sam
    Sam almost 8 years
    So, I think the touchpad and touchscreen would almost certainly create some trouble. because as far as i know, they tend to draw their config from similar places. I'm not sure though..!
  • Isti115
    Isti115 almost 7 years
    Thank you so much! I tried everything I could find, and neither did xserver-xorg-input-mtrack, nor touchegg work, but finally now it's perfect with your solution! :) I even get to keep the built in smooth scrolling of the Synaptics driver. (The device is a 2011 MacBook Pro with a fried graphics chip.) Just one thing that I'd like to add is that for some reason logging out and back in wasn't enough for me to grant the group read permission, it only started working after a complete reboot.
  • Isti115
    Isti115 almost 7 years
    ps.: I recommend checking the output of libinput-gestures-setup start in case of problems for others! It gives helpful error messages.
  • Munawwar
    Munawwar almost 7 years
    Tip for everyone: Using touchegg and xdotool I created github.com/Munawwar/ubuntu-touchpad-gestures. I have a sample touchegg.conf there
  • Nathan
    Nathan over 6 years
    Keep in mind that adding the user to the input group weakens security-- it means that user level processes have raw access to input, including all mouse and keyboard input. So a script without root could easily do system-wide keylogging. An abstraction layer would probably be good here-- something that runs as root and reads from /dev/input/*, and exposes some device that users can read that gives off touchpad events.
  • user5950
    user5950 over 6 years
    @Nathan maybe you should file a bug report here: github.com/bulletmark/libinput-gestures
  • Michael
    Michael almost 6 years
    Instead of logging out everytime, you can just pop open another terminal and run libinput-gestures-setup restart. I recommend in another terminal so you don't have to exit your text editor every time.
  • Pranal Narayan
    Pranal Narayan almost 6 years
    @Nathan Is there any way to overcome the security issue caused by adding user to input group? I want to try this out but not compromise on security
  • polynomial_donut
    polynomial_donut over 4 years
    not sure if this package is on 16.04 as well, but on 18.04, installing ` xserver-xorg-input-synaptics` is sufficient. No libinput needed.