sbd-scripts is a set of shell scripts used to handle events from scanbuttond written by Bernhard Stiftner. It was initiated to bundle the functions found on http://gentoo-wiki.com/Scanner_buttons_and_one-touch_scanning .
sbd-scripts ended up with added functionality and made-easy configurable now. Configuration options are centralized in sbd.rc, while functions are in sbd_functions.
sbd-scripts has the same drawback as scanbuttond though: it should be run as a user, since the daemon can't know which user is pressing a button on the scanner. In practice this means that you won't care if your scanner is hooked up to your desktop system or laptop, but if your scanner is connected to a server, that GUI user applications cannot be used.
Actions require different applications to be present, for example evolution or the gimp.
To use the print function, you will need a configured provider of lpr, for example cups.
Currently supported applications:
All releases are on the Sourceforge project page .
Check install locations in install.sh and run it with:
$ sh install.sh
Backup your scanbuttond config directory (probably /etc/scanbuttond/) and copy the shellscripts buttonpressed.sh, sbd_functions and sbd.rc there.
Run scanbuttond from a shell in foreground and remember the button numbers using:
$ scanbuttond -f
Edit sbd.rc to match your button numbers to supported functions. Select the functions you want to use.
Don't forget to set the SBD_CONFIGURED variable to yes when you're done.
LOCKFILE | Sets the lockfile scanbuttond will use. |
SBD_ACTION[N] | Sets the action to be used for button N. Possible actions are print, edit, file, mail. They will respectively send a scan to your printer, graphics editor, a file or a mail application. |
SBD_PAGE_WIDTH | Sets the default page width. |
SBD_PAGE_HEIGHT | Sets the default page height. |
SBD_RESOLUTION | Sets the default resolution in dpi for scans. |
SBD_COLOR_MODE | Sets the scanning mode to color/gray/lineart |
SBD_TMPFILE | Sets the file to be used in scan to file command. |
SBD_MAIL_APP | Sets the application to be used in scan to mail command. |
SBD_EDIT_APP | Sets the application to be used in edit scan command. Possible values currently are gimp, imagemagick and iv. See below for adding apps. |
SBD_CONFIGURED | When set to "yes", sbd-scripts will use the configured functions, when set to "no" sbd-scripts will output the pressed button number and device id. |
Of course only some more popular applications are supported by the sbd-scripts package. You can easily add or change these by editing sbd_functions. Just add your application with the right startup commands and flags to the case constructs in the appropriate function.
If you don't feel up to the task, drop me a mail and we'll see.
Most trouble with the scripts with probably come from lower parts of the application stack, such as the usb system permissions, sane installation or the running of scanbuttond.
The first thing to do when in trouble is setting the SBD_CONFIGURED to 'no', run scanbuttond in foreground mode and check that it generates events. Lower layers are fine if these are generated okay.
Next to check is that the executable names and paths in sbd_function's case constructs are correct, that they are in your path and that the user running scanbuttond has the right permissions and runtime environment at the moment of the events. Trying to run gimp for example will be hard if X is not running.
Last but not least all of /etc/scanbuttond must be accessible for the user running scanbuttond, and /etc/buttonpressed.sh should be executable.
For support, refer to the Sourceforge project page .
Pieter Lenaerts <e-type _at_ users sourceforge net>