Using MyPaint in Xfce

Wacom tablet configuration

 * This section is written for Xfce 4.10

GNOME 3 has a really nice system for configuring Wacom devices that uses libwacom to detect device capabilities, and to enable extra features depending on what buttons and knobs are present. It consists of two parts: a plugin for gnome-control-center which tweaks the settings, and a plugin for gnome-settings-daemon.

Xfce4 lacks this deep understanding of Wacom devices. If you have sensible button mappings (i.e. touchrings or slides which act as scroll wheels by default, and buttons which map to distinct button numbers), and no fancy features (like the touchring mode switcher button on an Intuos5) then you should be able to make it work with MyPaint right away. However if you need to remap buttons or use the fancy features, you'll have problems or you'll have to resort to running an old-fashioned .xsetwacomrc every time you plug in your tablet. Xfce 4.10 has a system for doing just that, but it's awkward and requires a lot of care to do in full. Better to use a GUI.

The challenge therefore is to make a desktop environment based on Xfce4 that just adds in the bits of GNOME that we need, and only those bits. These instructions should work with current Debian testing, which uses Xfce 4.10 and GNOME 3.8.

Prerequisites
Begin by purging all GNOME-related packages from your system, if you don't want them around any more.

Then make sure we have a full Xfce4 install. Debian users can do

sudo apt-get install task-xfce-desktop

Install the bits of GNOME we need too:

sudo apt-get install --no-install-recommends --no-install-suggests \ gnome-settings-daemon gnome-control-center

Workaround: GNOME settings for Wacom tablets do not work in Xfce
The GNOME control center can be used to configure tablets for use in GNOME, but these don't apply in Xfce because gnome-settings-daemon typically does not run in that environment.

We also need to inactivate all gnome-control-center plugins other than the Wacom one, because they can interfere with their Xfce equivalents. If you see two battery icons in your Xfce Notification Area, for example, that's what's happening. Power management issues are especially problematic, and can result in double suspends or worse. To turn off all GNOME settings plugins without "wacom" in their name, do

gsettings list-recursively \ | awk '/^(org\.gnome\.settings-daemon\.plugins\.[-a-z0-9_]+)\s+active\s+true/ {print $1}' \ | grep -v wacom | sort | uniq \ | while read a; do gsettings set "$a" active false; done

To see what plugins are active and what isn't:

gsettings list-recursively \ | egrep '^(org\.gnome\.settings-daemon\.plugins\.[-a-z0-9_]+\s+active\s)' \ | sort | uniq

To test, run the following in a terminal:

gnome-settings-daemon --debug

and watch the output scroll by as you do things. The only plugin which initializes should now be "gsdwacom".

To run the GNOME settings daemon when you next start Xfce:

cat >~/.config/autostart/gnome-settings-daemon-in-xfce.desktop <<__END__ [Desktop Entry] Type=Application Name=GNOME Settings [Xfce Wacom workaround] Comment=Use GNOME settings for Wacom tablets etc. Exec=gnome-settings-daemon Icon=preferences-system OnlyShowIn=XFCE; __END__

You can now restart Xfce, and gnome-settings-daemon will run only the Wacom parts, leaving other parts of your system to Xfce's settings daemon, xfsettingsd.

Workaround: no detailed Wacom preferences in Xfce
The workaround above provides the basic infrastructure needed to detect when you plug in your Wacom, and set it up with its configuration. However, ordinary users will need a control panel for their tablet too. Here's how to set Xfce up with that:

cat >~/.local/share/applications/gnome-wacom-panel-in-xfce.desktop <<__END__ [Desktop Entry] Type=Application Name=Wacom Graphics Tablet in Xfce Comment=Set your Wacom tablet preferences Exec=gnome-control-center wacom OnlyShowIn=XFCE; Icon=input-tablet Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog; Keywords=Tablet;Wacom;Stylus;Eraser;Mouse; Terminal=false __END__

This takes effect immediately. You can now configure the tablet using Applications → Settings → Wacom Graphics Tablet in Xfce.

Uninstalling the workarounds
These settings will need to be reset to their defaults if you use GNOME too, or you decide to switch to it.

gsettings reset-recursively org.gnome.settings-daemon.plugins

The installed autostart and control panel desktop entries can be removed with:

rm ~/.local/share/applications/gnome-wacom-panel-in-xfce.desktop rm ~/.config/autostart/gnome-settings-daemon-in-xfce.desktop