Make your workstation speak

You can make your linux workstation speak using espeak.  Espeak is a text-to-speech synthesizer.  If you have Ubuntu desktop, then you should already find it installed.

If you are a Ubuntu user and you don’t find espeak already installed, then you need to install the  following:

$ sudo apt-get install espeak espeak-data

If you have Fedora, you can install espeak, using yum.

$ sudo yum install espeak

To use espeak, go to the cmdline.

espeak “hello, this is a test

or

espeak -f <textfile>

or

cat <textfile> | espeak

You can control the speed at which words are spoken.

(To slow it down…default speed is 160)

espeak -s 120 “hello, this is a test”

To save the spoken words as a .wav file.  Rather than direct output.

espeak -w hello.wav “hello, this is a test”

You can select different voices.  To get a list of available voices use –voices.

Lets do the same but with a bit of italian accent.

espeak -v it “hello, this is a test”

Espeak also supports, though not fully, Speech Synthesizer Markup Language (SSML).  This is a markup language similar to xml which controls the way text is pronounced.

To see the details of how espeak pronounces words, use the -x and -X options.  This will output the phonetic codes associated with the spoken words, and whether the word is looked up or translated.

I hope this was useful.  Leave a comment if you find a particularly interesting way to use espeak.

Mounting raw image files and kpartx

I’m going to demonstrate a tool for working with raw image files of hard disks.  That tool is kpartx.  It is used to read block devices and to create device mappings of partitions.  IOW, each device file in /dev/mapper will represent a disk partition or a disk volume.

Let me show you an example and you will see what I mean.

Sometimes I use the dd command to backup my hard drives.  It’s easy to do.  You boot from a live CD and you use the dd command and netcat to backup your drive over your LAN to your backup server.   I covered that in a previous post, so I won’t go into great detail again.  I’ll skip ahead.


$ sudo dd if=/dev/sda | nc 192.168.140.11 12345

Now with my raw image file (gothbook.img) on my backup server, I want to examine that image file.  I can use kpartx to list any partitions that are to be found on that drive image.

# kpartx -l gothbook.img
loop1p1 : 0 512000 /dev/loop1 63
loop1p2 : 0 512000 /dev/loop1 512063
loop1p3 : 0 45056000 /dev/loop1 1024063
loop1p5 : 0 8388608 /dev/loop1 46090548
loop1p6 : 0 39070017 /dev/loop1 54492543
loop1p7 : 0 62733762 /dev/loop1 93562623

I can see from the output of kpartx that my drive image contains 6 partitions.  I can see their starting offsets.  The first column tells me the names of the device files that will be created if I choose to add these device partitions.  Lets add them now.

# kpartx -a -v gothbook.img
add map loop1p1 (253:6): 0 512000 linear /dev/loop1 63
add map loop1p2 (253:7): 0 512000 linear /dev/loop1 512063
add map loop1p3 (253:8): 0 45056000 linear /dev/loop1 1024063
add map loop1p5 (253:9): 0 8388608 linear /dev/loop1 46090548
add map loop1p6 (253:10): 0 39070017 linear /dev/loop1 54492543
add map loop1p7 (253:11): 0 62733762 linear /dev/loop1 93562623

# ls -l /dev/mapper
total 0
crw-rw---- 1 root root  10, 62 2010-06-15 17:40 control
brw-rw-r-- 1 neil neil 253,  6 2010-08-16 00:28 loop1p1
brw-rw-r-- 1 neil neil 253,  7 2010-08-16 00:28 loop1p2
brw-rw-r-- 1 neil neil 253,  8 2010-08-16 00:28 loop1p3
brw-rw-r-- 1 neil neil 253,  9 2010-08-16 00:28 loop1p5
brw-rw-r-- 1 neil neil 253, 10 2010-08-16 00:28 loop1p6
brw-rw-r-- 1 neil neil 253, 11 2010-08-16 00:28 loop1p7
The preceeding command added six device map files to /dev/mapper.  Each of these device files corresponds to a partition from that hard drive image.  We can now use these device files to mount these partitions and access any files they contain.
I want to mount the fifth partition (/dev/mapper/loop1p6) and have a look at its files.
# mkdir /mnt/sysimage

# mount /dev/mapper/loop1p6 /mnt/sysimage
# ls /mnt/sysimage
bin    dev   initrd.img      lost+found  opt   sbin     sys  var
boot   etc   initrd.img.old  media       proc  selinux  tmp  vmlinuz
cdrom  home  lib             mnt         root  srv      usr  vmlinuz.old
After mounting the device file, you can access the files contained on that partition.  When you are done, don’t forget to umount the partition and disconnect the device map files using kpartx.
# umount /mnt/sysimage
# kpartx -d -v gothbook.img

And that’s it.

Configuring grub to boot a fallback kernel

I’m writing this because the fallback behavior of grub seems broken or at the least poorly documented.

Here is the scenario.  I have a server in a remote location.  I have no access to the local console.  I need to update the kernel however there is a chance that this new kernel could crash and leave my server completely disabled.  In my scenario that is not an acceptable risk.

Fortunately grub can be manipulated enough so that a kernel is booted once and it if crashes, the system will reset and boot a previously known good kernel.

BTW, this is a RHEL5 system.  Here is my grub.conf file.

default=0
timeout=10
title RHEL known *good* kernel
root (hd0,0)
kernel /vmlinuz-2.6.18-164.el5 ro root=/dev/OS/vol1  rhgb quiet
initrd /initrd-2.6.18-164.el5.img
savedefault

title RHEL *new* kernel
root (hd0,0)
kernel /vmlinuz-2.6.18-194.8.1.el5 ro root=/dev/OS/vol1 rhgb quiet panic=5
initrd /initrd-2.6.18-194.8.1.el5.img

My “untested” kernel is the second item listed.  The kernel param panic=5 will cause the system to automatically reset after 5 seconds following the event of a kernel panic.  Otherwise, the server would be stuck in a crashed state until someone could physically intervene and power cycle the server.

Now comes the interesting part.  We need to tell grub to set the “untested” kernel as the default and to boot it only once.  We can do this from the grub shell.

# grub

grub> savedefault --default=1 --once
savedefault --default=1 --once
grub> quit

As you can see I tell grub to save the “untested” kernel (–default=1) as the default for one-time only (–once).  This makes the second menu item be the default item to be booted next.  After that, the default item will go back to being the one designated in the grub.conf file (default 0).

Now I can reboot the server with extra confidence.  If my kernel panics and crashes the server will soon reboot to the previous “good” kernel.  If the kernel does not panic and eventually proves itself to my satisfaction, then I can log back in and edit my grub.conf file such that my new kernel is now my known “good” kernel.

The official grub documentation gives a more elaborate example, which doesn’t work–At least not under RHEL5 or Centos5 distributions.   After googling around, it seems that others have the same issue with the documented features not working as expected.   If you have been struggling to get this to work, I hope you will enjoy my example.  It is easy to follow and hopefully it will give you the functionality that you need.

Ubuntu 10.04 Lucid Lynx and Wacom Bamboo CTL460 (revisited with Q&A)

In my first post on this subject,  I demonstrated how to enable the Wacom Bamboo CTL460 on Ubuntu 10.04.   Since then, I have received a number of questions which gave me the impression that some items need a more thorough explanation.  Following the Q&A, I will repeat my steps from my previous post.  This time with a slightly newer version of the driver.  The steps are the same.

Wacom Bamboo

Wacom Bamboo CTL460

Questions and Answers

Question:  I tried your steps but my Wacom tablet model xxx doesn’t work. Can you help?

Answer:

If you have some other Wacom tablet besides the model CTL460, these instructions may not work for you.  You are welcome to try them.  Since I only have the model CTL460, I am limited in the amount of advice that I can give you for whatever model you have.  If you can’t figure it out and I’m unable to help, you should try contacting the maintainer of the linuxwacom project or the author of the driver.  (modinfo wacom | grep author)

Question:  My Wacom tablet used to work under Ubuntu 9.xx, or 8.xx.  Why won’t it work under 10.04?

Answer:

One myth that needs to be addressed, is that the Wacom CTL460 is supported by Ubuntu 10.04 and will work out-of-the-box.  That is not true. If you had a previous version of Ubuntu and your Wacom CTL460 worked out-of-the-box, you need to realize that it no longer just works out-of-the-box.  There have been some changes to xorg since then.  In addition, if you have been using instructions in the past (previous to 10.04)  which included making changes to /etc/udev/rules.d, you can throw those out.  Those instructions do not apply anymore.  Furthermore, you do not need to install the package xserver-xorg-input-wacom.  That package contains code that does not work for this tablet. You can remove it if you want since it has no impact on the rest of these instructions.

Question:  Your steps worked great but one day I rebooted and my tablet doesn’t work anymore.  Help?

Answer:

You recently ran Update Manager and one of the packages you updated was the kernel image package.  Not a problem.  This is normal and to be expected.  You need to follow the steps again each time the kernel image package is updated to reinstall a new driver.

Question:  I was trying to configure my table in Gimp but I did not see a wacom input device.  Help?

Answer:

Make sure that your tablet is plugged in and working before you start the Gimp application.

Question:   Help?  I was following your steps but I noticed the following message:

Note: this package only supports Xorg server older than 1.6.5.
You are running a newer version.
Please build xf86-input-wacom instead.

Answer:

Simply ignore it.  I did.

Question: When will the Wacom CTL460 be supported out-of-the-box?

Answer:

I don’t know.  Hopefully in the next version.

Instructions

Install the following packages:

sudo apt-get install build-essential libx11-dev libxi-dev x11proto-input-dev xserver-xorg-dev tk8.4-dev tcl8.4-dev libncurses5-dev

Download the source code for the wacom driver from Sourceforge.  The current version as this writing is linuxwacom-0.8.8-3.

tar jxvf linuxwacom-0.8.8-3.tar.bz2
cd linuxwacom-0.8.8-3/
./configure –enable-wacom
make
cd ./src/2.6.30
sudo cp wacom.ko /lib/modules/`uname -r`/kernel/drivers/input/tablet
sudo depmod -a
sudo modprobe wacom

That is all.  You can plug in your Wacom CTL460 Bamboo tablet and begin using it.

If you take anything away from this exercise please remember this

What we did was replace the wacom driver that comes with the kernel package.  We simple copied our newly built wacom driver in its place.  Whenever you update the kernel package, you need to follow these steps again.  Be sure to reboot first so that you are running the new kernel prior to rebuilding a new driver.

If you don’t want to download a new version from Sourceforge, you can keep the folder from above and reuse it.   In that case you just need to do the following steps (don’t overlook the make clean below):

reboot (so that you are running the new kernel)
cd linuxwacom-0.8.8-3/
make clean
make
sudo cp wacom.ko /lib/modules/`uname -r`/kernel/drivers/input/tablet
sudo depmod -a
sudo modprobe -r wacom
sudo modprobe wacom

Additional tips

  • When you run Update Manager, be on the lookout for updates to the kernel image.  After updating the kernel image, you should reboot.  You will then be required to reinstall a new wacom driver.
  • Unplug your Wacom tablet before you rebuild a new module.
  • Plug in your tablet after you are done installing the new driver.
  • Plug in your table before you start Gimp or any other application that will be using your tablet.
  • While your tablet is plugged in, you can verify that your driver is loaded by using lsmod | grep wacom
  • Become familiar with modprobe, udevadm, and /var/log/kernel.log for additional low level troubleshooting

Performing backups with netcat

In this post I will demonstrate how to perform a backup of a disk partition over the network using dd and nc (netcat).  I will also introduce the pv command, which may be new to you.  The pv command can be installed by “sudo apt-get install pv”.

Lets assume that I have a laptop that I use for testing different linux distributions.  It has multiple operating systems and multiple disk partitions.  I want to backup my Fedora 12 partitions before installing Fedora 13.  I will use dd and nc to copy the Fedora 12 disk partitions across my network to a fileserver.

  • My laptop:  192.168.140.64
  • My fileserver: 192.168.140.11

The partitions on the laptop that I want to backup are:

  • /dev/sda4  (Fedora 12 lvm, 14.7GB)
  • /dev/sda8  (Fedora 12 /boot ext4, 263MB)

If you are wondering how I obtained the partitions and sizes, I used “parted -l”.

We have all the information we need, now lets begin.

First we tell the fileserver to listen on an unused high numbered port.  I’m choosing port 12345.

On the fileserver:

$ nc -l 12345 | pv -b -p -s 263m > laptop_sda8.img

Next we tell the laptop to begin copying data to the fileserver.

On the laptop:

$ sudo dd if=/dev/sda8 | nc 192.168.140.11 12345

If you are unfamiliar with the pv command, it reports the amount of data written to a pipe.  We use it to give us a progress bar.  The -b and -p option tells it to show progress in bytes.  We use -s 263m to tell it that we are expecting to receive 263MB of data.  This is needed to display the progress bar.

Here is what you will see on the fileserver side while data is being copied.

When the data finishes copying, you can use md5sum to verify your data.  Run md5sum on the source and md5sum on the destination and compare the results.  The two resulting numbers should be identical.

On the latop:

$ sudo md5sum /dev/sda8
b37349506c8d20d0d6b21e4f38c374bc  /dev/sda8

On the fileserver:

$ md5sum laptop_sda8.img
b37349506c8d20d0d6b21e4f38c374bc  laptop_sda8.img

Now we do the same steps for the partion /dev/sda4.

On the fileserver:

$  nc -l 12345 | pv -b -p -s 14700m > laptop_sda4.img

On the laptop:

$ sudo dd   if=/dev/sda4 | nc 192.168.140.11 12345

Now a word about security.  Notice that I copied my data in the clear across the network.  If I am copying my data across my home LAN, this is an acceptable risk to me.  If I am copying data across the Internet or any network shared with other people, this is not an acceptable risk.  In that case, an ssh tunnel should be used.

Here is how.

On the fileserver start the listener.  Same as before.

$ nc -l 12345 | pv -b -p 263M > laptop_sda8.img

Let me explain a few things here.  In our next set of commands we will open two terminal windows on the laptop.  In the first window we will setup an ssh tunnel from the laptop to the fileserver.  We will keep this tunnel open, while we use the second terminal window to run our data transfer.

Open two terminal windows on the laptop.

In terminal 1, establish an ssh tunnel to the fileserver, using a valid username@fileserver.

$ ssh -N -L 12345:localhost:12345 neil@192.168.140.11

In terminal 2, copy the data as before but this time the destination will be localhost port 12345.  The data will be encrypted and sent through the ssh tunnel to the file server.

$ sudo dd   if=/dev/sda8 | nc localhost 12345

Repeat these steps for the next partition (/dev/sda4).

When the copy has completed, you can end the ssh tunnel by using ctrl-c in terminal 1.

The ssh tunnel is secure but you give up speed and it requires extra processing power.  That is why I only use the ssh tunnel when security is a concern.

Converting ogg/vorbis to mp3

This is a simple bash shell script to convert a folder of .ogg (vorbis) files to mp3 files.  I won’t get into the advantages of one format versus another.  You may have a device that supports only mp3 files.  Therefore, you have a reason to convert .ogg files to .mp3.  There are many scripts out there that will convert ogg to mp3 but with most of them you lose all of your tags in the process.  That can be a real pain.  My script will preserve the tags of my choice and write them to the mp3 file.

The tags that I am concerned about are:

  • Artist
  • Album
  • Title
  • Genre
  • Date (year)
  • Track #

If there are other tags that you care about, then adjust the script as needed.

The shell script depends on the following packages:

  • id3v2
  • vorbis-tools
  • lame

For Ubuntu users:

$ sudo apt-get install id3v2 vorbis-tools lame

For Fedora users:

$ sudo yum install id3v2 vorbis-tools lame

Without further ado, here is the script


#!/bin/bash
# convert *.ogg files to *.mp3 files

function addtag {

ARTIST=`cat $1 | sed -e '/^.*ARTIST/!d' -e 's/^.*ARTIST=//'`
TITLE=`cat $1 | sed -e '/^.*TITLE/!d' -e 's/^.*TITLE=//'`
DATE=`cat $1 | sed -e '/^.*DATE/!d' -e 's/^.*DATE=//'`
GENRE=`cat $1 | sed -e '/^.*GENRE/!d' -e 's/^.*GENRE=//'`
TRACK=`cat $1 | sed -e '/^.*TRACKNUMBER/!d' -e 's/^.*TRACKNUMBER=//'`
ALBUM=`cat $1 | sed -e '/^.*ALBUM/!d' -e 's/^.*ALBUM=//'`

echo "artist: $ARTIST"
echo "title: $TITLE"
echo "album: $ALBUM"
echo "genre: $GENRE"
echo "date: $DATE"
echo "track: $TRACK"

id3v2 --artist "$ARTIST" --album "$ALBUM" \
--song "$TITLE" --genre "$GENRE" \
 --year "$DATE" --track "$TRACK" \
"$(basename "$1" .tag).mp3"

}

for a in *.ogg
do
ogginfo "$a" > "$(basename "$a" .ogg).tag"
oggdec -o - "$a" | lame -h -V 5 --vbr-new - "$(basename "$a" .ogg).mp3"
addtag "$(basename "$a" .ogg).tag"
rm "$(basename "$a" .ogg).tag"
done

I named the script ogg2mp3.sh.  I chose to leave the *.ogg files rather than delete them after converting them to *.mp3 files.  To use the script, I cd to a folder that contains *.ogg files, then I run the script.


$ cd ~/Music
$ ./ogg2mp3.sh

You can make the script as elaborate as you want. Hopefully it was simple enough to give you a feel of how to use the other utilities together: ogginfo, oggdec, id3v2, and lame.

Using tmpfs for high performance I/O

When you need high performance I/O, one thing to consider using is tmpfs.  tmpfs allows your to mount a folder of your filesystem in your system’s RAM.  Before using tmpfs there are somethings you must be aware of.  You need to have enough additional RAM available to hold your data.  Your data will be stored in memory which means that it is volatile.  If your system crashes or restartts then you will  lose everything stored in tmpfs.  With that in mind, use tmpfs at your own risk.  If you intend to keep your data save it to disk when you are done using tmpfs.

To mount a folder as tmpfs


$ sudo mkdir /mnt/tmp

$ sudo mount -t tmpfs -o size=1500m none /mnt/tmp

Every file that you put in /mnt/tmp will actually be stored in system RAM.  Reading and writing to those files will be extremely fast.

I’m going to create an image of a 1GB SD card in /mnt/tmp and use it with my Android emulator.


$ mksdcard -l stick1 1024m /mnt/tmp/sd_card_1g.img

$ emulator -sdcard /mnt/tmp/sd_card_1g.img @fakeDroid

This boosted the performance of my Android emulator because it’s using RAM for its SD card.  When I am finished with my Android emulator I will copy my data back to disk for safe keeping.


$ cp /mnt/tmp/sd_card_1g.img ~/sd_card_1g.img

Running Android Apps on your linux box

So you want run Android applications on your linux box.  Basically you’ll need three things.  The Android SDK, Java JRE, and 32bit libraries.  If your server is already a 32bit server then you already have 32bit libraries installed.  If you server is a 64bit server then you will need to install the 32bit execution libraries, for Ubuntu that is the  ia32-libs package.


$ sudo apt-get install openjdk-6-jre

$ sudo apt-get install ia32-libs

Download the Android SDK from developer.android.com

Extract and run the Android SDK.


$ tar -zxvf android-sdk_r06-linux_86.tgz

$ cd android-sdk-linux_86

$ cd tools

$ ./android &

Click on “Installed Packages” to update your tools and APIs.  Click the “Update All…” button.

I am going to select the “Android 2.2, API 8” and click Install.  This will download and install several packages.

When it finishes downloading and installing the additional packages, you should see something like the following.

Now lets create a virtual Android device.  Select “Virtual Devices” and click the “New…” button.

Select a name for your Android device.  I chose fakeDroid.  Select an API level, SD card size, and a Skin (screen size).  The Hardware section, lets you outfit your Android with various features.  I’m going to select the following:

  • SD Card support
  • GPS support
  • Accelerometer
  • DPad support
  • Touchscreen support
  • Audo playback support

Then click “Create AVD”.

This will create a virtual android device for you.  You can select your virtual device and click the Start button.

Your virtual Android will then power-on and begin botting.  When it finishes booting you should see something like the following.

Now lets install an Android application.  Click on the button that looks like a globe to start the android web browser.  You should see a web browser like the following.

Enter the URL:  http://www.androidfreeware.org

To zoom in you can double click on the Android touchscreen.  You can pan the display by using your mouse pointer to “drag” the touchscreen.  I’m going to install the application PicSay 1.3.0.7, but you can choose whatever application you want.  You install android applications by downloading the android package files with .apk extension.   You should see a link for downloading the file.

After the download begins, click and drag downward on the top menu bar.  This is where android keeps its notifications.  Soon, you should see that the download has completed.

Click on the downloaded file and it will open the installer program for that application.  Click the Install button.

When the application finishes installing, you can click the home button to go back to your Android home page.  Then click the touch screen button which looks like a grid.  That is the launcher button.  It takes you to the screen where you can launch applications.  You should see the icon for your newly installed application (PicSay).

To start the PicSay application, click its icon.   We are done here.

Have fun experimenting with the android SDK.

View your current network settings with nm-tool

A short post to tell you about a tool named nm-tool. Use nm-tool to display your current network settings. nm-tool is installed as part of the NetworkManager package.

Ubuntu: network-manager package
Fedora: NetworkManager package

As you can see it returns a lot of useful information.

$ nm-tool
NetworkManager Tool
State: connected
- Device: eth0  [Auto eth0] ----------------------------------------------------
 Type:              Wired
 Driver:            r8169
 State:             connected
 Default:           yes
 HW Address:        00:24:8C:95:28:BF
 Capabilities:
 Carrier Detect:  yes
 Speed:           100 Mb/s
 Wired Properties
 Carrier:         on
 IPv4 Settings:
 Address:         192.168.140.11
 Prefix:          24 (255.255.255.0)
 Gateway:         192.168.140.1
 DNS:             192.168.140.19
 DNS:             192.168.140.9
- Device: wlan0  [Auto stargate] -----------------------------------------------
 Type:              802.11 WiFi
 Driver:            ath5k
 State:             connected
 Default:           no
 HW Address:        00:11:6B:62:22:4C
 Capabilities:
 Speed:           54 Mb/s
 Wireless Properties
 WEP Encryption:  yes
 WPA Encryption:  yes
 WPA2 Encryption: yes
 Wireless Access Points (* = current AP)
 stargate:        Infra, 00:14:D1:4E:40:EE, Freq 2437 MHz, Rate 54 Mb/s, Strength 48 WPA2
 *stargate:       Infra, 00:1C:F0:5F:78:A5, Freq 2412 MHz, Rate 54 Mb/s, Strength 90 WPA2
 stargate:        Infra, 00:14:D1:4E:40:EE, Freq 2462 MHz, Rate 54 Mb/s, Strength 45 WPA2
 IPv4 Settings:
 Address:         192.168.142.106
 Prefix:          24 (255.255.255.0)
 Gateway:         192.168.142.1
 DNS:             192.168.140.19
 DNS:             192.168.140.9

Wacom Bamboo CTL460 diagnostics using xidump

I’m going to show you a program called xidump that comes with the Wacom driver.  I use it to view raw data from my Wacom tablet.

Some of the data you can see are:

  • Pen coordinates
  • Amount of pressure
  • Pen Proximity events
  • Button events

I must assume that you already have a working Wacom tablet and that you are using the Wacom driver from Sourceforge.  If not, see my previous post on the subject.  The current driver as of this writing is linuxwacom-0.8.7.tar.bz2

Go to the folder where you downloaded the Wacom driver source.  If you don’t have the driver source anymore, then download it again from the link above.

Extract the driver source.  The xidump program is already prebuilt, therefore you won’t be compiling anything.  It is ready to use.


$ tar jxvf linuxwacom-0.8.7.tar.bz2

$ cd linuxwacom-0.8.7/

If your system is 32-bit, then use the 32-bit xidump.


$ cd prebuilt/32

If your system is 64-bit, then use the 64-bit xidump


$ cd prebuilt/64

If your Wacom table it not connected, please connect it now.  List the available input devices.  If you have the CTL460, like I do, you will be using the device named “Wacom Bamboo 4×5 Pen”


$ ./xidump -l
Virtual core pointer           disabled
Virtual core keyboard          keyboard
Virtual core XTEST pointer     extension
Virtual core XTEST keyboard    extension
Power Button                   extension
Power Button                   extension
Microsoft Comfort Curve Keyboard 2000 extension
Microsoft Comfort Curve Keyboard 2000 extension
Microsoft Basic Optical Mouse  extension
Macintosh mouse button emulation extension
Wacom Bamboo 4x5 Finger pad    extension
Wacom Bamboo 4x5 Finger        extension
Wacom Bamboo 4x5 Pen eraser    extension
Wacom Bamboo 4x5 Pen           extension

Let’s run xidump and view some raw data.  If you have a different tablet than the CTL460, then you will see a different list of device names.  Determine which device name applies to your model using trial and error, if it’s not obvious to you.


$ ./xidump "Wacom Bamboo 4x5 Pen"

After running xidump, pick up the pen and begin using it with your tablet.  You should see a screen like the following in your terminal.

Viewing raw data with xidump

The picture above shows the current coordinates of my pen.  It shows the maximum values.  You can see that I was applying a pressure of 491, which almost half of the maximum pressure value of 1023.  The 01-DOWN event  means that the pen was touching the tablet surface rather than hovering above.  You can use this tool to test various pen and tablet features, while you are using your tablet with other applications such as Gimp.  When you are done, use ctrl-c in the terminal window to terminate program.