-
Notifications
You must be signed in to change notification settings - Fork 173
Home
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.
Libwacom supplies metadata about Wacom 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.
To clone the git repository use:
git clone https://github.com/linuxwacom/libwacom.git
Peter Hutterer is the current libwacom maintainer. Bastien Nocera is the original maintainer.
Please do not send email regarding bugs or feature requests to the maintainer. Use the mailing lists instead.
Before building from git with ./autogen.sh, install the dependencies:
On Ubuntu:
First open the "Software & Updates" program and ensure the "Source code" box is enabled in the "Ubuntu Software" tab. Close the window and tell it to reload the software list if prompted. Next, install the dependencies by running:
sudo apt-get install build-essential && sudo apt-get build-dep libwacom
or
sudo apt-get install build-essential 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
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.
In case you run into this error while building on Ubuntu 16.04
Makefile.am: error: Libtool library used but 'LIBTOOL' is undefined
Makefile.am: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
Makefile.am: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
Makefile.am: If 'LT_INIT' is in 'configure.ac', make sure
Makefile.am: its definition is in aclocal's search path.
execute this
sudo apt-get install libtool
and then reattempt the build.
During make install
, the data files are installed into the supplied prefix, usually /usr/share/libwacom
. For local testing of new data files, you can just copy the data file(s) directly into the directory:
sudo cp -r /home/<path>/libwacom/data/* /usr/share/libwacom/