XOrgでWacom intuos2

Vine Linux 4.2でWacom Intuos2(USB)を使えるようにしたときのメモ。
(参考にされる方は自己責任でよろしく)
Gimpで筆圧検知はできているが、消しゴムは動作していない。また活線挿抜にも対応できていないようだ。
(追記 2008.2.13 消しゴムはGimpで設定する必要があった)

参考:

まずドライバ(linuxwacom)をThe Linux Wacom Project – Wacom device support on Linuxからダウンロード。解凍したディレクトリ中の /prebuilt/32/wacom_drv.so を /usr/X11R6/lib/modules/input/ にコピー。(上書きするときはバックアップをとっておくこと)

続いてxorg.confの編集。編集パラメータを確認するために less /proc/bus/input/devices してみたところ

I: Bus=0003 Vendor=056a Product=0042 Version=0115
N: Name="Wacom Intuos2 6x8"
P: Phys=
S: Sysfs=/class/input/input2
H: Handlers=mouse1 event2 
B: EV=1f
B: KEY=1cdf 0 1f0000 0 0 0 0 0 0 0 0
B: REL=100
B: ABS=f000163
B: MSC=1

と表示された。自機では Handlers が event2 になっているので、/etc/X11/xorg.conf には以下のように("Device" を "/dev/input/event2" として)追記した。

Section "InputDevice"
    Identifier  "stylus"
    Driver      "wacom"
    Option      "Device" "/dev/input/event2"
    Option      "Mode" "Absolute"
    Option      "Type" "stylus"
    Option      "USB"  "on"
    Option      "Suppress" "30"
EndSection

Section "InputDevice"
    Identifier  "eraser"
    Driver      "wacom"
    Option      "Device" "/dev/input/event2"
    Option      "Mode" "Absolute"
    Option      "Type" "eraser"
    Option      "USB"  "on"
    Option      "Suppress" "30"
EndSection

Section "InputDevice"
    Identifier  "cursor"
    Driver      "wacom"
    Option      "Device" "/dev/input/event2"
    Option      "Mode" "relative"
    Option      "Type" "cursor"
    Option      "USB"  "on"
    Option      "Suppress" "30"
EndSection

/etc/X11/xorg.conf の Section "ServerLayout" に下記を追記。

InputDevice "stylus" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"

(追記)
cursor、eraser、stylusのそれぞれに何を割り当てるかは、Gimpの「ファイル」-「ダイアログ」-「デバイスの状態」で設定する。
「デバイス」ダイアログのツールの部分を、タブレットのペンや消しゴムでクリックすることでそれぞれに割り当てられるツールを変更することができる。