10

I bought my girlfriend a Wacom Bamboo CTH-470 recently and it is running well after installing wacom-dkms. I have now run into a wall that I don't know how to get around. The touch on the tablet will not turn off. I am running Ubuntu 12.04 Beta 2. I have tried turning the touch off from the wacom settings in the settings menu. The pen and touch both work perfectly fine, it is just that the touch drives her insane when trying to draw in myPaint.

4 Answers 4

17

Edit

Checking the comments and other answers it looks like some are still looking for toggling touch using the tablet's buttons. If you just want that you need 3 things (shown for Ubuntu/Unity):

  1. A simple command (that can be run in the terminal or in a script file)

randompast's solution with a 1-line command is nice and can be turned into a more convenient 1-line toggle command:

xsetwacom --list | grep --line-buffered "TOUCH" | awk '{system("echo "$8";xsetwacom --get "$8" TOUCH;")}' | tr "\n" " " | awk '$2 == "off" {system("xsetwacom --set "$1" TOUCH on")} $2 == "on" {system("xsetwacom --set "$1" TOUCH off")}'

You don't need that if you already have your own script or command line of course, but it's a convenient way of toggling the touch of connected tablets without knowing the tablets' name or id.

  1. Set up a keyboard shortcut

If you want to run this without the terminal, you need to save the script in a file, make it executable and create a keyboard shortcut for it. That's because you can't assign a command directly to the tablet's buttons (but you can assign a keystroke ...).

In Unity open System Settings > Keyboard > Shortcuts and create a new shortcut. Avoid the Super key since it may not always work in step 3.

As command, put the name of your script file (full path, between single quotes, if you're not sure then drag-drop the file in a terminal and use the created command).

enter image description here

  1. Assign the shortcut's Keystroke to your button

Open System Settings > Wacom Tablet > Map Buttons ... and assign the keystroke you chose to your button.

To know which button is which you can first assign them letters with no modifier, select a text field and press the buttons to see which letter they correspond to.

enter image description here

Here beware: not all the buttons will be recognised (3 out of 4 for my Bamboo) and not all keystroke will work (I can't get any with the Super key to work). You'll have to try different combinations.

Original Answer (to learn the commands)

I set up my Pen & Touch over a year ago so I may be wrong here. What I usually do is run in a terminal:

xsetwacom --set "Wacom BambooPT 2FG 4x5 Finger touch" touch off

This won't work for you as you have another tablet so try first

xsetwacom

which should give you the parameters to use. First you need to get the name of your device (let's call it DEVICE_NAME), so try:

xsetwacom --list devices

This gives me for my Pen & Touch:

Wacom BambooPT 2FG 4x5 Pen eraser id: 11 type: ERASER
Wacom BambooPT 2FG 4x5 Pen stylus id: 12 type: STYLUS
Wacom BambooPT 2FG 4x5 Finger pad id: 13 type: PAD
Wacom BambooPT 2FG 4x5 Finger touch id: 14 type: TOUCH

Obviously the one which is of type TOUCH is the one to disable here. Here DEVICE_NAME would be Wacom BambooPT 2FG 4x5 Finger touch and DEVICE_ID would be 14.Then you need to know which parameter to disable, so try:

xsetwacom --list parameters

There's a plethora of parameters to enable/disable, and for each parameter name (let's call this PARAM_NAME) the type of value expected is explained. In this case we want to turn the Touch parameter Off, which you can do with the --set option. The syntax is:

xsetwacom --set "DEVICE_NAME"  PARAM_NAME  PARAM_VALUE

or

xsetwacom --set DEVICE_ID  PARAM_NAME  PARAM_VALUE

If you're not sure what to put in place of PARAM_VALUE, try the --get option to see the current value:

xsetwacom --get "DEVICE_NAME"  PARAM_NAME
2
  • 3
    Don't forget that xsetwacom doesn't store the settings, so you need to run the command line every time you log on to your session. For convenience you could have the script bound to a keyboard shortcut (to be able to enable/disable touch at will) or you may even be able to bind it to a button or your tablet (never tried it though).
    – Maxweel
    Apr 18, 2012 at 12:19
  • 1
    This is pretty useful, but I'd like to be able to assign the Touch ON/OFF function to the button on the tablet itself which would be really helpful, since you can't do that from the Wacom Properties in the System Settings menu. Because nobody's bothered to update the Wacom Properties properly to give it the functions for assigning buttons.
    – user94959
    May 26, 2016 at 9:48
2

Here is a 1-line solution:

xsetwacom --list | grep --line-buffered "TOUCH" | awk '{system("xsetwacom --set "$8" touch off")}'
1
  • Just tried it again 4 years later on a new setup, still works like a charm. I only wanted the pen to work, so I just stick this in my .bashrc and open a terminal (after plugging in the tablet) and bam touch is off.
    – randompast
    Nov 25, 2020 at 19:45
0

I wrote this script so that I can control turning touch on/off no matter which computer I plug the tablet into (because these IDs change between machines). You might find it useful as well.

#!/usr/bin/python

# kermit-internal-pytouch 0|1

import re, sys, subprocess
resp = subprocess.Popen(['xinput', '-list'], stdout = subprocess.PIPE)
out, err = resp.communicate()
WacomLine = re.compile('Wacom')
FingerLine = re.compile('Finger')
idExpr=re.compile('id=(?P<number>\d+)')
for line in out.split("\n"):
    if WacomLine.search(line) and FingerLine.search(line):
        identifier = idExpr.search(line)
        num = identifier.group("number")
        subprocess.call(['xinput', '-set-prop', num, "Device Enabled", sys.argv[1]])
resp = subprocess.Popen(['xinput', '-list'], stdout = subprocess.PIPE)
out, err = resp.communicate()
print(out)

I put this script in /usr/local/bin along with these two simple bash scripts to call it without having to remember the parameters...

kermit-hw-bamboo-untouch:

#!/bin/bash
kermit-internal-pytouch 0
exit

kermit-hw-bamboo-touch:

#!/bin/bash
kermit-internal-pytouch 1
exit

That said, I find it really sad that there isn't better support for tablets in Ubuntu. Maybe one day Wacom will show our community some attention too...

0

Throwing yet another script in the batch, I wrote this one for myself. I have it in an executable file wacomtouch in a .scripts folder I added to my environment path. Thus, to disable touch, I only need to run wacomtouch off. It automatically detects all the params, so it theoretically works with any Wacom tablet automatically.

(This relies on the pcregrep package.)

#!/bin/bash

STATUS="$1"

#Isolate the id of the touch device automatically.
rawID=`xsetwacom --list | pcregrep -M 'TOUCH' | pcregrep -o 'id\: \d*'`
#Trim further
device=`echo "$rawID" | grep -o "[0-9]\+"`

xsetwacom --set $device touch $1

case $1 in
    on)
        echo "Tablet touch is ENABLED."
        ;;
    off)
        echo "Tablet touch is DISABLED."
        ;;
    *)
        echo "Invalid option. Must be either on or off."
        ;;
esac

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .