Forwarding Wacom tablet over network

Posted on

Problem :

I have a Lenovo X220 Tablet laptop and wanted to use it as a graphics tablet on my PC. Can I forward its input to my PC over the network?

Solution :

Run a netcat server on the PC and write into a named pipe:

mkfifo event_wacom
nc -l -k 3333 > event_wacom

Now I am using wdaemon to emulate the device on the PC. You can clone it from here:

git clone git://git.code.sf.net/p/linuxwacom/wdaemon

Here is its wiki page: https://github.com/linuxwacom/xf86-input-wacom/wiki/wdaemon

For wdaemon to be able to read from a named pipe I had to make a small change.
In the input.c file I commented out the part where it says “Grab the device” around line 72-79.

Otherwise I got this error when running wdaemon: Unable to grab device event_wacom (Inappropriate ioctl for device)

Now build wdaemon:

./autogen.sh --prefix=/usr
make && make install

Next you have to find out the type of your tablet. You can list wdaemons known types with

wdaemon -w

Mine looks like this:

...
51 Wacom DTU1931
52 Wacom ISDv4 90
53 Wacom ISDv4 93
...

You can find the name of your wacom device on your tablet with:

evtest /dev/input/wacom

On your PC run:

wdaemon -t 52 -p event_wacom

-t is the type id of your device, mine is a Wacom ISDv4 90.

Now you only have to send the input events to this server from your tablet:

stty -icanon && nc 192.168.0.2 3333 < /dev/input/wacom

You might have to switch to a tty, otherwise the wacom device might be grabbed by X.

The stty -icanon command disables buffering, so the events are sent immediately.

Now you should be able to use your tablet on your PC.

You can limit the tablets range on your pc to a single screen by running

xsetwacom --list devices

to list your tablet devices and

xrandr

to find your screen name and then

xsetwacom --set 11 MapToOutput DVI-0
xsetwacom --set 12 MapToOutput DVI-0

Leave a Reply

Your email address will not be published.