By markush at 2010-12-02 17:04
In this tutorial I'll describe detailed which steps are necessary in order to use a scanner which is connected via USB to a Linux-computer from any other computer in the network (even Windows will work).
Software on the server (which is the computer where the scanner is installed) one has to install at least inetd (or xinetd) and sane. On any client there must be installed xsane or any sane-frontend (I'm using xsane)
Configuration for the server on the server one has to edit the /etc/saned.d/saned.conf file and insert the hosts which are allowed to use the scanner, one may insert the whole network, for example with a line.
When using the inetd daemon we edit the file /etc/inetd.conf and insert a line:
For an explanation please read the manpage for inetd.
sane-port stream tcp nowait root.root /usr/sbin/saned saned
When using xinetd one has to create a new file in the /etc/xinetd.d/ directory, we'll call the file saned:
After this configurations be sure to restart the daemon!
port = 6566
socket_type = stream
wait = no
user = daemon
group = daemon
Configuration for the client on the client we'll have to edit the /etc/saned.d/net.conf file and insert the IP-adress of the server, please note that I tried it with the hostname of the server which failed.
Furthermore there is a file dll.conf in the /etc/saned directory, be sure that there is a line with the single word net in this file.
The permissions: every user which is permitted to use the scanner has to be member of the scanner group. If the scanning device is a multifunction/printer/scanner the user has also to be member of the lp group!
Now we may test our configuration. Using nmap we can check the service on the server.
Please note the line "6566/tcp open unknown", the port for saned is open.
Samsung ~ # nmap -p 6566 192.168.178.10
Starting Nmap 5.21 ( http://nmap.org ) at 2010-11-29 19:54 CET
Nmap scan report for srv-zuhause.home.local (192.168.178.10)
Host is up (0.0031s latency).
PORT STATE SERVICE
6566/tcp open unknown
MAC Address: xx:xx:xx:xx:xx:xx (xx Computer)
Nmap done: 1 IP address (1 host up) scanned in 0.23 seconds
Now on the client we may execute
and if everything works we get informations about the device, for example:
There is a 32bit version of xsane for Windows available, with this one can also use the scanner from a Windows-client.
markus@Samsung ~ $ scanimage -L
device `net:192.168.178.10:hpaio:/usb/PSC_1400_series?serial=CN619D724804DZ' is a Hewlett-Packard PSC_1400_series all-in-one.
I've tested this with Slackware 13.1/inetd and as well with Gentoo/xinetd as Server and with Slackware 13.1, Gentoo, and Arch as clients.