Scanner buttons and one-touch scanning

Introduction
Thanks much to Bernhard Stiftner, you can now configure your scanner buttons to do one-touch scanning in Linux!!! Here's a little howto for it!
 * scanbuttond

Supported Chipsets:
 * epson
 * plustek
 * niash
 * snapscan

An untested ebuild for scanbuttond has been posted on the Gentoo Bugzilla.

Compile
Don't forget to run ldconfig! Otherwise, you will get error messages like Unable to load backend library "/usr/local/lib/libscanbtnd-backend_meta.so"!

Test
For a test run just start scanbuttond, press your scan buttons, and check your log files

Jul 27 06:34:29 dragon scanbuttond: query button Jul 27 06:34:29 dragon scanbuttond: query button Jul 27 06:34:29 dragon scanbuttond: query button Jul 27 06:34:29 dragon scanbuttond: button 1 has been pressed. Jul 27 06:34:30 dragon scanbuttond: query button Jul 27 06:34:30 dragon scanbuttond: button 2 has been pressed. Jul 27 06:34:30 dragon scanbuttond: query button Jul 27 06:34:30 dragon scanbuttond: button 2 has been released. Jul 27 06:34:30 dragon scanbuttond: query button Jul 27 06:34:30 dragon scanbuttond: button 3 has been pressed. You can also run

Then, scanbuttond will run in foreground and you can see the messages directly.

Environment
make sure /usr/local/bin is in your profile. Edit /etc/env.d/00local

Automatic Startup
If the PC you'll be running this software on is most commonly accessed by only one person at a time (as most Desktop PCs are) then you may wish to add it to your desktop's startup.


 * Gnome: Desktop » Preferences » Sessions » Startup Programs » Add »

On a system with multiple users you may want to use a sysvinit or init-ng script to run the daemon as root each boot. Create an init script to automatically load on startup

/etc/scanbuttond
If you use the niash or plustek chipset you may need to uncomment this line:

You'll need to figure out which buttons map to which label on your scanner (IE the "one-touch" button may actually be button 2 and the "print" button may be button 3 and the "email" button 1.

Sample scripts
These scripts use pretty generic options, however, to see what options are available for your specific scanner, please run

one-touch copy
An alternative, much faster for black and white copy command: The advantage is that the print job file sent to the printer is small and very quickly printed as all pixels are black and white, which ensures the monochrome option. The quality, however is fairly similar to an ordinary copier.

one-touch e-mail
=Troubleshooting= try putting one of these lines in

try unplugging and replugging your scanner then check

to make sure it is recognized

Your Scanner Isn't Supported
Jul 24 19:11:59 dragon scanbuttond: no supported devices found. rescanning in a few seconds... Jul 24 19:12:01 dragon scanbuttond: rescanning devices...

There is hope! You may be able to add your information to the code

Find out what your scanner product and vendor ID is:

Google to find out which driver supports that device, and manually add your scanner (example adding CanoScan LiDE 30, which is already supported by the CVS Version)

Hint: To get CanoScan D660U fully supported with the FAU Button change this before compiling:

Don't forget to recompile at least the backend. Cd into the "backends" directory in the 0.2.3 source tree and "make; make install"

Key points

 * You need to increment the number of supported devices by 1


 * Add a comma to the last line in the section, then add your device


 * Add a comma to the last line in the section, then name your device

Work YOU can do!

 * E-mail Bernhard if your scanner works but is not on the list
 * Create a sample script for a common task to include
 * Use your programming expertice to help with the coding
 * sysv init script
 * init-ng init script