[ permalink / comments ]


[ permalink / comments ]

I'm an open-source hippie. I install Debian on pretty much every x86/x64 device I come within arms reach of. But I'm also a delusional artist. So when I had the opportunity to snag a Cintiq Companion 2 512GB model, I had to take it, but then I also had to install Debian Linux on it.

The Cintiq's input devices are only very recently supported as of some patches to the Linux kernel that were submitted... today. This thread has some details of the in-testing branches of the Linux Wacom driver to poke at, but hopefully those details will be irrelevant in the near future, and the Cintiq Companion 2's devices will "just work" with the driver that's in the kernel, so I won't talk about it more.

I want to talk about making a tablet PC usable in Linux with no keyboard. And by "no keyboard" I really mean "only using a keyboard for setup".

Let's have a look at some nifty software for getting set up...

  • Gnome-Pie - A radial menu tool. I use this so I can hold a button next to the screen of the tablet, have this radial menu pop up around the cursor (which is controlled by the stylus), hover over an option, and let go of the button to activate it. This is how I activate the on-screen keyboard, GIMP, and deeper menus for all the normal applications on the system. Anything I need quick-access to is here.
  • Onboard - An on-screen keyboard. Out of all the ones I've used, this one sucks the least. I first used it in Ubuntu, but it seems to be in Debian Testing now too.
  • GIMP, Krita, MyPaint - I assume you want something to draw with. All these applications are great. Religious wars rivalling Emacs vs. Vim will be waged about which one is better.
  • xsetwacom - This will come with the Linux Wacom driver, but it's important to mention it here, because we'll be using it a lot.
  • Xfce - Xfce, the desktop environment. I know everyone's attached to their desktop environment of choice, be it KDE, Gnome, Unity, Windomaker, or whatever. I use Xfce because it's super-customizable, lightweight, and really snappy and responsive. The super-customizable part is most important for the tablet aspect here.

Naturally, being a Debian hippie, I picked a bunch of packages that are already in the current Debian Testing. So if you're on that, or anything based off Debian that's reasonably up-to-date, you can install all of this with...

apt-get install krita gimp mypaint xfce4 onboard gnome-pie

(Run as root or through sudo, of course.)

Here's the script I use to set up my Wacom Tablet using xsetwacom at Xfce startup. This script is just placed in a ~/Scripts directory, and run from the Xfce Application Autostart list. That list can be found in Applications Menu -> Settings -> Session and Startup -> Application Autostart.


# Set pressure sensitivity curve.
# ----------------------------------------------------------------------

# 0 0 100 100 - Default
# 50 0 100 50 - Pretty firm.
# 100 0 100 0 - Really really firm.

xsetwacom --set "Wacom ISDv5 325 Pen stylus" PressureCurve 0 0 100 100

# Setup buttons next to the screen. Map them to functions in Gimp and
# other stuff.
# ----------------------------------------------------------------------

PADDEVICE="Wacom ISDv5 325 Pad pad"

xsetwacom set "${PADDEVICE}" Button 2 "key ]"       # Cursor size increase (GIMP)
xsetwacom set "${PADDEVICE}" Button 3 "key ["       # Cursor size decrease (GIMP)
xsetwacom set "${PADDEVICE}" Button 8 "key x"       # Foreground/background swap (GIMP)

xsetwacom set "${PADDEVICE}" Button 9 "key shift +" # Zoom in (GIMP)
xsetwacom set "${PADDEVICE}" Button 10 "key -"      # Zoom out (GIMP)
xsetwacom set "${PADDEVICE}" Button 11 "key ctrl z" # Undo

xsetwacom set "${PADDEVICE}" Button 1 "key ctrl alt a" # Map this to gnome-pie invocation

# Everything after this is my attempts to disable some non-functional
# input devices that would mess with all the others. (Cintiq Companion
# 2 specific.)
# ----------------------------------------------------------------------

xmodmap -e "keycode 122 ="
xmodmap -e "keycode 123 ="

# Disable volume/power/whatever buttons.
#xinput set-prop 9 "Device Enabled" 0
#xinput set-prop 6 "Device Enabled" 0
xinput set-prop "Sleep Button" "Device Enabled" 0

# Disable the "upser key" thingy on the bottom left.
xinput set-prop "AT Translated Set 2 keyboard" "Device Enabled" 1

# Disable fucking everything named "power button"
IDS=$(xinput list --id-only)
for ID in ${IDS}; do
	NAME=$(xinput list --name-only ${ID})
	if [ "x${NAME}" == "xPower Button" ]; then
		echo "Power is ${ID}"
		xinput set-prop ${ID} "Device Enabled" 0

(Feel free to copy, modify, and use this script as much as you like.)

Gnome-Pie is in my Application Autostart list in the same way (but the application itself has an option to add itself to the autostart list). I hooked the Gnome-Pie invocation binding in the script up to one of the menus in the Gnome-Pie settings. On the Cintiq Companion 2, this connects the middle button (the one with the Windows logo) to the Gnome-Pie menu.

I recommend turning on "turbo mode" for your main menu pie in Gnome-Pie. It will give you the ability to just hold the menu button, hover roughly over what you want to select, and let go of the menu button for fast selections.

What you put in your Gnome-Pie setup to act as a quick selection is up to you. Right now I only have Onboard, Gnome, and an option that recurses down into a normal applications menu. Ideas for the future include alternate layouts for the pad buttons. Those would essentially just be scripts like the one above, but only the section for mapping pad buttons, and a specific setup for each application or context within an application. A crazy thought is that maybe even something like Blender - with all of its reliance on keybindings - could be a bit usable with Gnome-Pie and a keyboard-less tablet PC.

Hopefully this undirected brain dump is useful to some other Linux-loving artist that wants to put their OS of choice on a tablet PC.

[ permalink / comments ]

Previous page | Next page
Copyright © 2015 Clifford Jolly
All rights reserved