Advertisements

Ubuntu Karmic 9.10: Wacom Graphire 2 HAL Configuration

With yesterday’s background in hand, here’s the the fdi file for my Wacom Graphire 2 tablet that:

  1. Fixes the incomprehensible Wacom screwup in Ubuntu Karmic
  2. Swaps the two buttons on the side of the stylus

This is based largely on the work found there, with the generalizations stripped out and the tablet identification changed just slightly.

The file is stashed at:

/usr/share/hal/fdi/policy/20thirdparty/10-linuxwacom.fdi

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
 <device>
 <match key="info.product" string="Wacom Graphire2 4x5">
 <merge key="input.x11_driver" type="string">wacom</merge>
 <merge key="input.x11_options.Type" type="string">stylus</merge>
 <merge key="input.x11_options.Button2" type="string">3</merge>
 <merge key="input.x11_options.Button3" type="string">2</merge>
 <append key="info.callouts.add" type="strlist">hal-setup-wacom</append>
 <append key="wacom.types" type="strlist">eraser</append>
 <append key="wacom.types" type="strlist">cursor</append>
 </match>
 </device>
 <!-- Wacom names "parser" -->
 <device>
 <match key="info.udi" contains_not="subdev_0">
 <match key="info.udi" contains_not="subdev_1">
 <match key="info.udi" contains_not="subdev_2">
 <match key="input.x11_options.Type" contains="stylus">
 <merge key="info.product" type="string">stylus</merge>
 </match>
 <match key="input.x11_options.Type" contains="eraser">
 <merge key="info.product" type="string">eraser</merge>
 </match>
 <match key="input.x11_options.Type" contains="cursor">
 <merge key="info.product" type="string">cursor</merge>
 </match>
 </match>
 </match>
 </match>
 </device>
</deviceinfo>

This button config works better for me:

  • front button = 3 — right mouse button
  • rear button = 2 — middle mouse button

The tip switch remains the left button: if you try to configure the “mouse” to be left-handed, the tip switch functions as button 3, which is probably not what you really expected. The switch on the other end remains the eraser.

Notice that the button configuration syntax is totally different from the evdev syntax that did basically the same thing yesterday: different drivers, different syntax.

Advertisements