Software

How to get Apple-like gestures on the Linux desktop

With the help of Fusuma, you can get a better trackpad experience on the Linux desktop.

You might be surprised to find out that one of the biggest issues with Linux on a laptop isn't a lack of apps or ease of use. The Achilles heel of Linux on laptops is the trackpad.

I understand a big part of the problem is that Apple owns patents on trackpad gestures, something which hinders the open source community's ability to create a quality experience. But that hurdle shouldn't equate to a bad experience, which many people have. Not only does Linux install without any sort of multi-touch gestures, it is sometimes over sensitive or under sensitive. I've installed Linux on laptop hardware and found the trackpad configuration was a losing battle—until I discovered Fusuma.

SEE: Side-by-side chart of popular Linux distros (Tech Pro Research)

Fusuma is a command line tool that allows you to configure the trackpad, and even includes multi-touch gestures. It's not perfect (nor does it remotely emulate the smoothness of the trackpad experience on either macOS or Chrome OS), but Fusuma does make using a trackpad on Linux exponentially better.

I'm going to demonstrate the installation and usage of Fusuma on Ubuntu Desktop 18.04, running on a Dell XPS Developer edition laptop. With that said, let's get to the installation.

Installing Fusuma

The first thing you must do is add your user to the input group with the command:

sudo gpasswd -a $USER input

Log out, and log back in.

Fusuma must be installed with gem, which means you need Ruby. So, before you install Fusuma, you must first install Ruby. Open a terminal window and issue the command:

sudo apt-get install ruby

Once Ruby is installed, you'll need to install a single dependency with the command:

sudo apt-get install libinput-tools

An optional dependency (for sending shortcuts) can be installed with the command:

sudo apt-get install xdotool

You can now install Fusuma with the command:

sudo gem install fusuma

Running Fusuma at login

Fusuma must be running, and you don't want to do that from the command line. To set Fusuma to run at login, open the GNOME Dash, and search for Startup Applications. In the Startup Applications tool, click the Add button. In the resulting pop up (Figure A), enter Fusuma for both the name and the command.

Figure A

Figure A

The Startup Applications tool.

Once you've configured the Startup Application, click Save, and close the tool. Log out of GNOME and log back in. Fusuma is now running.

Configuring Fusuma

Now we can configure our gestures. You'll find that a three-finger swipe to the right serves as a back gesture (in your default browser), and a three-finger swipe to the left is a forward gesture (again, in your default browser). Let's reverse that. Open a terminal window, and then open the configuration file with the command:

nano ~/.config/fusuma/config.yml

In that file, look for the following lines:

swipe:
  3:
    left:
      command: 'xdotool key alt+Right'
    right:
      command: 'xdotool key alt+Left'

Change that to:

swipe:
  3:
    left:
      command: 'xdotool key alt+Left'
    right:
      command: 'xdotool key alt+Right'

Save and close the file. Log out of GNOME, and log back in. Open up your browser, and you should now be able to use a three-finger swipe to the left for back and a three-finger swipe to the right for forward. You can also change the three-finger swipe up and three-finger swipe down, as well as the four-finger swipe gestures. In fact, at this point, it should be obvious how you configure the three- and four-finger gestures for Fusuma.

Say, for example, you want to create a gesture that opens a new tab in Firefox. You could add the following three-finger swipe down for this action:

    down:
      command: 'xdotool key ctrl+t'

Save and close that file.

After you make any changes to the configuration file, you must log out and log back into GNOME.

Basic gestures

Fusuma gives you some pretty basic multi-touch gestures for trackpads on Linux. It's nowhere near a perfect solution, but it is certainly better than what you'll find for nearly any desktop distribution.

Also See

linuxhero.jpg
Image: Jack Wallen

About Jack Wallen

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website jackwallen.com.

Editor's Picks

Free Newsletters, In your Inbox