LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2391|回复: 2

[arch][PKGBULD]linuxwacom 驱动wacom数位板

[复制链接]
发表于 2006-1-13 13:11:16 | 显示全部楼层 |阅读模式
[size=+1]1、编译制作linuxwacom的Arch包:
首先用下面的PKGBUILD制作linuxwacom的arch安装包。
[php]
pkgname=linuxwacom
pkgver=0.7.2
pkgrel=1
pkgdesc="the WACOM Tablet driver"
url="http://linuxwacom.sourceforge.net/"
depends=()
source=(http://dl.sourceforge.net/linuxwacom/$pkgname-$pkgver.tar.bz2)
makedepends=()
md5sums=()
backup=()
build() {
        cd $startdir/src/$pkgname-$pkgver
        ./configure --prefix=/usr \
        --enable-wacom
        make || return 1
        make DESTDIR=$startdir/pkg install
        cp $startdir/src/$pkgname-$pkgver/prebuilt/wacom_drv.o $startdir/pkg/usr/X11R6/lib/modules/input/
        mkdir -p $startdir/pkg/lib/modules/`uname -r`/kernel/drivers/usb/input/
        cp $startdir/src/$pkgname-$pkgver/src/2.6.14/wacom.ko $startdir/pkg/lib/modules/`uname -r`/kernel/drivers/usb/input/
}
[/php]

注意:将最后一个cp命令中的2.6.14换成你的内核版本号儿,不包括最后的relversion。比如你的内核版本是2.6.13-2,那么就要用2.6.13。

用此PKGBUILD来makepkg,并pacman -Af pkgname.pkg.tar.gz来安装。必须用-Af选项,因为wacom.ko和wacom_drv.o在系统中存在,要强制覆盖。建议安装这个包以前备份这两个文件。

安装好这个包以后,插上数位板,然后sudo rmmod wacom && sudo modprobe wacom试试,如果没有错误信息,则wacom.ko模块儿已经可以正常工作,进行下一步,设置Xorg。

[size=+1]2、设置Xorg

需要编辑/etc/X11/xorg.conf中的InputDevices和ServerLayout两个区段。
详细内容可以参照:
InputDevices:http://linuxwacom.sourceforge.net/index.php/howto/inputdev
ServerLayout:http://linuxwacom.sourceforge.net/index.php/howto/srvlayout

下面是我的数位板使用的相关设置,供参考:
[php]
Section "InputDevice"
  Driver        "wacom"
  Identifier    "stylus"
  Option        "Device"        "/dev/input/event3"   # USB ONLY
  Option        "Type"          "stylus"
  Option        "USB"           "on"                  # USB ONLY
EndSection

Section "InputDevice"
  Driver        "wacom"
  Identifier    "eraser"
  Option        "Device"        "/dev/input/event3"   # USB ONLY
  Option        "Type"          "eraser"
  Option        "USB"           "on"                  # USB ONLY
EndSection

Section "InputDevice"
  Driver        "wacom"
  Identifier    "cursor"
  Option        "Device"        "/dev/input/event3"   # USB ONLY
  Option        "Type"          "cursor"
  Option        "USB"           "on"                  # USB ONLY
EndSection

Section "ServerLayout"

        Identifier  "Server Layout"
        Screen "Screen0"
        InputDevice     "Mouse1"        "CorePointer"
        InputDevice     "Keyboard1"     "CoreKeyboard"
        InputDevice     "stylus"        "SendCoreEvents"
        InputDevice     "eraser"        "SendCoreEvents"
        InputDevice     "cursor"        "SendCoreEvents"
EndSection
[/php]

对于具体参数不了解可以man wacom或者查阅项目页上的文档:http://linuxwacom.sourceforge.net/index.php/howto/main

[size=+1]3、其他相关设置

wacdump:wacdump命令可以用来检测wacom数位板具体是/dev/input下的哪一个设备,及其型号等其他信息,这在设置xorg的时候是非常有用的。使用方法如:sudo wacdump /dev/input/event0。

gimp:文件──首选项──输入设备──扩展输入设备,将stylus、eraser、cursor的模式改为屏幕或窗口(依个人习惯,默认是禁用,没有压感),其余设置依个人喜好。

inkscape:文件──input devices,和gimp设置一样。

wacomcpl:wacomcpl命令可以用来设置数位板本身的参数,例如移动速度、加速度、压力敏感程度等。图形化界面,不用多说。不过这个设置工具有个bug,进入具体的设置面板以后,如果不点OK而是点了Cancel的话,会让窗口上的列表和按键失去作用。
 楼主| 发表于 2006-1-13 13:35:48 | 显示全部楼层
另外请教一下,namcap制作好的linuxwacom包会有如下提示:

linuxwacom W: File (usr/lib/TkXInput/libwacomxi.la) is a libtool file.
linuxwacom W: File (usr/lib/libwacomcfg.la) is a libtool file.

这个东西是什么意思?我先去搜索搜索。
回复 支持 反对

使用道具 举报

发表于 2006-1-13 15:45:03 | 显示全部楼层
diony,  you did a good job, thanks very much.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表