scanbm(8)
π scanbm(8) β Scanner button daemon π
okay bestie, we're doing scanbm today, from the scanbd family, and it's honestly giving "quiet little proxy that runs the whole group chat." pull up a chair π«Ά
β¨ NAME β¨
scanbm β the user scanning support daemon for scanbd / the scanbd manager. she's the one who lets actual scanning apps talk to your scanner while scanbd is busy hogging it. iconic behavior, no cap.
πΈ SYNOPSIS πΈ
scanbm [-c configfile [-d[debuglevel] ] [-s] [-t device -a action ]
scanbd -m [-c configfile [-d[debuglevel] ] [-s] [-t device -a action ]
two ways to summon her, same energy π
π¦ DESCRIPTION π¦
so, scanbm is the companion to scanbd, which is a scanner button monitoring daemon that can trigger execution of scripts when a button is pressed. like, you hit the button on the scanner, scripts go brrr. adorable. β¨
here's the tea: scanbm is actually a (symbolic) link to scanbd, and you can call it as scanbm or as scanbd -m. same girl, different entrance. π
now β scanbd (the scanner button daemon) opens and polls the scanner, and therefore locks the device. so no other application can access the device directly (open the /dev/..., or via libusb, etc). it's holding the aux cord and not sharing. π
to enable scanning from applications, we use scanbm as a manager for scanbd. scanbm is a "proxy" for saned to access the scanner from an application. scanbm listens for requests on the saned network port. so literally every application needs to use the "net" backend to access a scanner. no sneaking in the back door, bestie.
if a scan request arrives to scanbm on the sane-port, scanbm requests the scanbd scanner polling daemon to interrupt polling and to release the device by sending it a dbus-message (that's the default) or a posix-signal (SIGUSR1) (that's signal-mode). then it starts the real saned, which does the scanning and sends the data back to the requesting application. when the scanning is done and saned exits, scanbm requests scanbd to restart the polling by sending a second dbus-message (or the posix-signal SIGUSR2) and ends execution. the polling scanbd now re-enables polling of the devices. it's a whole relay race and she never drops the baton πβοΈπ₯
scanbm is meant to be started from inetd, xinetd or systemd. unlike saned, it does not support stand-alone mode. she needs a group chat to thrive, she's not a solo act. periodt.
β οΈ Note: Please note that thescanbmacts as a proxy tosaned, all scanner applications must be configured to use the sane"net"backend to access the scanner. Direct access will not be possible. fr fr, don't even try it.
π OPTIONS π
-cconfigfile,--config=configfile β use configfile instead of the default/etc/scanbd/scanbd.confconfiguration file. (yes bestie you can have a custom one, live your truth π)-d[debuglevel],--debug[=debuglevel] β turn debug mode on. if specified, set the debug level to debuglevel:1= error2= warn3= info4-7= debug
-s,--signalβ use signalsSIGUSR1/SIGUSR2instead of dbus messages to request the pollingscanbdto stop / restart polling. old school communication, still slaps β¨-tdevice,--trigger=device β trigger action for device (numerical).-aaction,--action=action β action (numerical) to be triggered.
π§ SCANBD/SCANBM CONFIGURATION π§
scanbd and scanbm are configured trough scanbd.conf (/etc/scanbd/scanbd.conf, or the file pointed out by the -c <config-file>). one config file to rule them all, iykyk π
π NETWORK SETUP FOR SCANBM π
scanbm must be setup very similar to the way saned must be setup. note that your inetd must support IPv6 if you want to connect to scanbm over IPv6; xinetd, openbsd-inetd and systemd are known to support IPv6, so check the documentation for your inetd daemon. do your homework bestie, it's giving β¨ due diligence β¨
π INETD CONFIGURATION π
for scanbm it is also necessary to add a configuration line to /etc/inetd.conf, just like it is for saned.
the configuration line normally looks like this:
sane-port stream tcp nowait scanbd.scanbd /usr/sbin/scanbm scanbm
however, if your system uses tcpd(8) for additional security screening, you may want to disable saned access control by putting +'' `` in saned.conf (see saned(8)) and use a line of the following form in /etc/inetd.conf instead:
sane-port stream tcp nowait scanbd.scanbd /usr/sbin/tcpd
/usr/sbin/scanbm
π note that both examples assume that there is ascanbdgroup and ascanbduser. if you follow this example, please make sure that the access permissions on the special device are set such thatscanbdandsanedcan access the scanner (the programs generally need read and write access to scanner devices). permissions are the whole plot twist here, don't skip them π
if xinetd is installed on your system instead of inetd, the following example for xinetd.conf may be helpful:
# default: off
# description: The sane server accepts requests
# for network access to a local scanner via the
# network.
service sane-port
{
port = 6566
socket_type = stream
wait = no
user = scanbd
group = scanbd
server = /usr/sbin/scanbm
server_args =
}
finally, it is also necessary to add a line of the following form to /etc/services:
sane-port 6566/tcp # SANE network scanner daemon
the official IANA short name for port 6566 is "sane-port". the older name "sane" is now deprecated. rip to a legend, but we moved on π
scanbm does not do access control, but it relies on the access control done by saned. she's not the bouncer, she just works the door. π
β SEE ALSO β
π«Ά AUTHOR π«Ά
Louis Lagendijk
that's the whole page bestie, you ate π
β¨ version scanbd 1.92, dated 02 Jan 2013 β yes she's an elder icon and she still runs the scanner queue like a queen ππΈ
π¦ where this page comes from
- debian bookworm: scanbd 1.5.1-6+b1 Β· GPL-2.0-or-later
- debian trixie: scanbd 1.5.1-7+b1 Β· GPL-2.0-or-later
- ubuntu jammy: scanbd 1.5.1-6build1 Β· GPL-2.0-or-later
- ubuntu noble: scanbd 1.5.1-7 Β· GPL-2.0-or-later
- ubuntu questing: scanbd 1.5.1-7
- ubuntu resolute: scanbd 1.5.1-7build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms