Successfully tested on Ubuntu Server 10.04 LTS 64-bit

After the successful installation of my scanner, I discovered with frustration that the four hard buttons of the device were not supported by the default backend. Few days later, after thorough searches, I installed an old scanner buttons polling daemon called scanbuttond and found out it was conflicting with saned, the daemon used to share the scanner over the network.

I was about to give up when I came across the scanbd project. This clever daemon opens, polls, locks the scanner and then acts as a kind of proxy which manages all further access to the device by any other application, thus avoiding possible conflicts.

I had a hard time installing and configuring scanbd but it was worth it. I’ll describe the steps I followed in two separate posts. Today’s post will explain how to compile scanbd with EPSON Perfection V200 Photo support and my next post will be about its complete configuration, including a nice script which perfectly manages the scanner four buttons.
 
So, let’s start by downloading the latest source code from scanbd project website:

wget link_to_latest_scanbd_source_code

 
Make sure the /usr/local/src directory exists and is writable by your primary user account. Then, unpack the file:

tar xf scanbd_source.tgz -C /usr/local/src

 
Scanbd can use SANE or scanbuttond backends. Unfortunately, the epkowa (SANE) backend which is used to control the EPSON Perfection V200 Photo does not fully support the front buttons. Therefore, I had to look for a compatible backend… and I found one, thanks to www.linotux.ch.

To patch scanbd to use this specific backend, cd to the directory where you extracted scanbd source code and modify scanbuttond/backends/Makefile by adding references to epson_vphoto as follows:

all: epson_vphoto.so mustek.so plustek.so plustek_umax.so snapscan.so ...

epson_vphoto.so: epson_vphoto.c epson_vphoto.h

 
Then, download the epson_vphoto backend and extract it to the same current scanbuttond/backends directory.

Finally, add the following line at the end of scanbuttond/backends/meta.conf:

epson_vphoto

 
OK, we’re almost ready to compile but, as Ubuntu does not come by default with the compilation tools required, we’ll need to install them first:

apt-get install build-essential checkinstall

 
And while we’re at it, let’s also install some specific packages needed to compile or use scanbd:

apt-get install libconfuse-dev libusb-dev libudev-dev libdbus-1-dev dbus

 
Now, build

USE_SCANBUTTOND=yes make -e clean all

 
and install:

USE_SCANBUTTOND=yes checkinstall --deldesc=yes

 
When asked for, you can enter the following packaging informations (modify according to your version):

This package will be built according to these values:

0 -  Maintainer: [ Wilhelm Meier <wilhelm.meier@fh-kl.de> ]
1 -  Summary: [ Scanner button daemon ]
2 -  Name:    [ scanbd ]
3 -  Version: [ 1.2 ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ Misc ]
7 -  Architecture: [ amd64 ]
8 -  Source location: [ scanbd-1.2 ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ scanbd ]

Enter a number to change any of them or press ENTER to continue:

 
Voilà! Package is built and install is done. We’ll take care of the complete configuration in part 2.

That’s all Folks!


For further reading, see scanbd website and CompilingEasyHowTo of the Community Ubuntu Documentation.

Advertisements