Skip to content
Aaron Skomra edited this page Sep 19, 2017 · 30 revisions

Libwacom is a library to help implement Wacom tablet settings. It is intended to be used by client-programs that need model identification. It is already being used by the gnome-settings-daemon and the GNOME 3.4 Control Center Wacom tablet applet. In the future, the xf86-input-wacom driver may use it as well.

Purpose

Libwacom supplies metadata about Wacome tablets including whether or not they are connected to your system, the list of styli it supports, as well as information about the styli themselves. In the past this information was only available within the drivers (as comments), exported in different ways (sysfs attributes), non-machine readable in public documentation, or, worst of all, hidden in Wacom's internal drivers for OS X or Windows.

For example the Wacom tablet applet UI uses information exported by libwacom such as:

  • whether the tablet is built-in (Cintiq or tablet PC) or external
  • which form factor it has and is it right or left-handed reversible
  • the list of styli it supports
  • for each stylus, its full name, the number of buttons, is there an eraser, what it looks like

After knowing what each tablet has to offer, a way to match the definitions to XInput devices, assign settings per-tablet, and importantly, switch stylus configuration when the user switches stylus was needed. This is done using the new GsdWacomDevice and GsdWacomStylus objects, shared between gnome-settings-daemon (which will apply the configuration) and gnome-control-center (which will set the configuration).

There are also a few debugging applications, such as list-wacom in gnome-settings-daemon, to show the attached GsdWacomDevices, or test-wacom in gnome-control-center, to test the display of tablets not available to you.

Dependencies

Before building from git with ./autogen.sh, install the dependencies:

On Ubuntu:

sudo apt-get build-dep libwacom

or

sudo apt-get install libgudev-1.0-dev libxml++2.6-dev

On Fedora:

sudo yum-builddep libwacom

or

sudo dnf builddep libwacom

On Centos 6:

sudo yum install libgudev1-devel

Building

Depending on your system, you may find it helpful to use these commands

./autogen.sh --prefix=/usr --libdir=/lib64
make
sudo make install

On Ubuntu 16.04 instead use:

./autogen.sh --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu/

for the first command in the above block.

##Data Files##

After building, copy the libwacom data files in to /usr/share/libwacom:

sudo cp -r /home//libwacom/data/* /usr/share/libwacom/ or sudo cp -r /home//linuxwacom-libwacom/data/* /usr/share/libwacom/