Image Capture Daemon

A cross-desktop scanner networking and button monitoring daemon


This project was started in response to a post on the xdg mailing list.
It provides a service for monitoring scanner buttons and sharing across a network - however,
unlike other similar programs which monitor scanner buttons, instead of directly running a
command, it emits a D-BUS signal which can then be used by GNOME Volume Manager or the KDE
equivalent. Similar to saned, it also supports accessing remote scanners through RPC, but
does not require inetd or xinetd, and so is better suited for desktop systems.


As of version 0.0.4, button monitoring is mostly finished but untested, and the networking
still needs to be added. See the TODO file in the source package. Since it won't do anything
useful to most people right now, I wouldn't recommend using "make install".


When started, the daemon (imcapd) acquires the org.freedesktop.ImageCapture name on the D-BUS
session bus and exports the /org/freedesktop/ImageCapture object for methods and signals. It
first acquires a list of scanners through SANE and checks for any scanner buttons (options which
start with "button-"), then wakes up every 2 seconds to scan any active buttons. If any buttons
have been pressed, it emits the "ButtonPressed" D-BUS signal with the button name (set by the
scanner's SANE driver) as an argument.

It runs completely on-demand, registering as a D-BUS autostart service, and exiting after 20
seconds of inactivity if there are no buttons to monitor. Since some SANE drivers only allow
one connection at a time to a device, it also allows monitoring to be temporarily disabled for
certain devices through the "ReleaseDevice" method, which closes the connection to the device
specified as an argument, but leaves it in the internal button list, ready to be reactivated
with the "ReclaimDevice" method. See the dbus_api file in the docs directory of the source
package for details.

To keep track of hardware changes as scanners are added or removed, it can be registered as a
HAL callout (the Makefile doesn't do this yet, so if you want it to do this you'll need to add
a link from /etc/hal/device.d to the imcapd binary manually). When HAL detects a device hotplug
or removal, it runs imcapd, which either starts normally and checks if the new device is a
scanner, or if another instance is already running, sends it a "RescanDevices" signal to force
it to rescan for available buttons.


See the SourceForge project page for downloads, the bug tracker, news, etc.
To compile, you'll need a development version of D-BUS > 0.93. HAL isn't required but is very
useful for detecting scanner hotplugging.


Code by Donald Straney (burntfuse [AT]
Build system, advice, ideas, etc. by Etienne Bersac
Thanks to SourceForge for hosting this project! Logo