Sane network scanning
- Installing requirements
# Basic requirements sudo apt install sane sane-utils xsane # XSane might need the following libraries # (start xsane net:10.0.0.123 from cli to see if libcanberra is missing) sudo apt install libcanberra-gtk-module libcanberra-gtk3-module # Copy systemd files sudo cp /usr/lib/systemd/system/saned* /etc/systemd/system # Set RUN=yes in /etc/default/saned # Enable Sane socket sudo systemctl enable saned.socket
# Find USB vendor ID # (Vendor (VVVV) and device (DDDD) in "ID VVVV:DDDD") sudo lsusb # Change udev rules to use specific device group # (Change VVVV for Vendor ID) echo '"SUBSYSTEM=="usb", ATTRS{idVendor}=="VVVV", MODE="0660", GROUP="scanner", ENV{libsane_matched}="yes"' > cat /etc/udev/rules.d/55-libsane.rules # Edit /etc/saned.d/saned.conf and add access lists as follows 192.168.0.0/24 10.0.0.0/24 127.0.0.1 localhost # Add scanner group to users sudo usermod -a -G scanner [your-user-name] # Enable Sane socket sudo systemctl enable saned.socket sudo systemctl start saned.socket # If scanner is still not listed, edit /etc/systemd/system/saned@.service and
# Enable net module # Edit /etc/saned.d/dll.conf and uncomment line containing net # Edit /etc/saned.d/net.conf and add server ip addresses as follows: localhost 10.0.0.100
# If no scanners are listed on the client, you might want to run saned as root: # Edit /etc/default/saned and uncomment RUN_AS_USER # Edit /etc/systemd/system/saned.socket and uncomment RUN_AS_USER # Edit /etc/systemd/system/saned@.service and uncomment both User and Group # You can enable logging on the server by uncommenting Environment=SANE_CONFIG_DIR=/etc/sane.d SANE_DEBUG_DLL=255 # To view debugging information: tail -f /var/log/syslog # Now search for scanners on client: scanimage -L # You might want to enable data port ranges in /etc/saned.d/saned.conf data_portrange = 10000 - 10010