scanbd(8)

πŸ’– scanbd β€” the scanner button daemon πŸ’–

ok bestie, gather round, because this one is genuinely iconic. this is scanbd(8), aka the Scanner button monitoring daemon. she sits there, she watches your scanner, and the second you poke a button she runs a script. no cap. πŸŽ€


✨ SYNOPSIS ✨

Polling mode, babes:

scanbd [-c configfile ] [-f] [-d[debuglevel] ]

Manager-mode, lowkey a whole different vibe:

The manager mode of scanbd that can be triggered by the -m option is not documented in this man-page but in scanbm(8). so like, go read that one if that's what you're here for πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so scanbd is a scanner button monitoring daemon that can trigger execution of scripts when a button on a scanner is pressed. like, you press the button, she notices, she runs your script. main character energy fr fr.

the catch? 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). yeah. she's possessive. it's giving only-child. 😭

so to enable scanning from applications, we use scanbm as a "proxy" for saned to access the scanner from an application. scanbm listens for requests on the saned network port for scanning requests. if a scan request arrives, scanbm requests the scanbd daemon to release the scanner. then it starts the real saned which scans and sends the data back to the requesting application. when the scanning is done and saned exits, the scanbm daemon tells scanbd to resume polling the scanner. teamwork!! 🫢

scanbd polls the scanner regularly (the interval can be set in scanbd.conf) and monitors for any scanner button to be pressed. if it detects a button press it triggers execution of the appropriate script as defined in scanbd.conf. periodt. πŸ’…


🌸 OPTIONS 🌸

  • -c configfile, --config=configfile β€” use configfile instead of the default /etc/scanbd/scanbd.conf configuration file. your config, your rules, bestie ✨
  • -d[debuglevel], --debug[=debuglevel] β€” turn debug mode on. if specified, set the debug level to debuglevel:
    • 1 = error
    • 2 = warn
    • 3 = info
    • 4 - 7 = debug
  • -f, --foreground β€” run scanbd in the foreground. no hiding in the background, she's standing right there πŸ‘‘

⭐ SIGNALS ⭐

  • SIGUSR1 β€” stop polling and relase the scanner (used by scanbm). yes, "relase". we don't talk about it. πŸ™ˆ
  • SIGUSR1 β€” resume polling (used by scanbm). and yeah, she's listed twice in the original, and honestly? iconic. both facts are staying. πŸ’–
  • SIGHUP β€” rescan for available devices (useful when no automatic detection is available (HAL, UDEV)). a little refresh, a little glow-up ✨

πŸŽ€ MAIN SCANBD CONFIGURATION πŸŽ€

scanbd and scanbm are configured trough scanbd.conf (/etc/scanbd/scanbd.conf). the distributed scanbd.conf contains a detailed explantion of the configuration options. (yes, "explantion". she's doing her best and we love her for it. πŸ“)

the -c option can be used to override the default configuration file. slay.


🌈 SEE ALSO 🌈


πŸ‘‘ AUTHOR πŸ‘‘

Louis Lagendijk β€” the legend, the moment, the blueprint πŸ’œ


and that's the whole page, bestie!! this was scanbd version 1.92, dated 02 Jan 2013. go forth and press buttons, you absolute icon πŸ¦‹βœ¨πŸ’–