![]() Now it is time to start/enable rvice and start scanbm.socket. The last step is to modify the alternative configuration of sane in /etc/scanbd/sane.d/dll.conf: just make sure that the "net" directive is commented and the corresponding scanner-backends are uncommented: Whenever there is a connection to the standard sane network socket, systemd starts scanbm ("manager mode" of scanbd), which in turn tells (the already running) scanbd to stop polling the scanner and then it starts saned with the alternative configuration directory. This prevents them from using the locally attached scanners directly (and blocking them). Now the desktop applications (which use libsane) are forced (by the above dll.conf) to use the net-backend only. Localhost # scanbm is listening on localhost Modify the net-backend configuration file (see scanbd's README.txt for more complicated setups): Modify /etc/sane.d/dll.conf so that it includes only the "net" directive (either delete the other directives (printers), or comment them with # symbol): # cp -r /etc/sane.d/* /etc/scanbd/sane.d/ ![]() etc/scanbd/sane.d/), which will be actually used by sane backend to access the attached scanner.įirst, copy all configuration files from /etc/sane.d/ to /etc/scanbd/sane.d/ (these will be needed later): Since scanbd and saned are running on the same machine as the scanner is connected to, we need to have two sets of saned configurations - one in the default location ( /etc/sane.d/), which would redirect local applications to a network socket, that systemd is listening on, and another one (e.g. scanbuttond, however these seem to be unmaintained nowadays. There are also alternatives to scanbd, eg. Afterwards the scanbd-manager scanbm restarts the polling by sending another dbus-signal to scanbd.ĭue to the above, the set up of the scanbd requires changes in default configuration of SANE and also definition of own action scripts (defining what should be done when a button on the scanner is pressed). Then it starts the real saned which scans and sends the data back to the requesting application. If a scan request arrives on the sane-port, scanbm stops the polling by sending a dbus-signal to the polling scanbd-daemon. To make this happen, scanbm is configured instead of saned as the network scanning daemon. To solve this, a second daemon is used (in the so called "manager-mode" of scanbd): scanbm is configured as a "proxy" to access the scanner and, if another application tries to use the scanner, the polling daemon is ordered to disable polling for the time the other scan-application wants to use the scanner. So no other application can access the device directly (open the /dev/., or via libusb, etc). Scanbd (the scanner button daemon) opens and polls the scanner and therefore locks the device. ![]() Scanbd tries to solve the problem with managing such scanners to make use of the scanner-buttons they have (only when the buttons are supported by sane). The majority of the desktop scanners are more or less "passive" devices: They might function with a suitable application but are unable to be used by buttons only. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |