LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Linux Answers > Networking
User Name
Password

Notices

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.
Code:
192.168.2.0/24
When using the inetd daemon we edit the file /etc/inetd.conf and insert a line:
Code:
sane-port    stream    tcp    nowait    root.root    /usr/sbin/saned    saned
For an explanation please read the manpage for inetd.

When using xinetd one has to create a new file in the /etc/xinetd.d/ directory, we'll call the file saned:
Code:
# /etc/xinetd.d/saned
service sane-port
{   
    port = 6566 
    socket_type = stream 
    wait = no 
    user = daemon 
    group = daemon 
}
After this configurations be sure to restart the 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.
Code:
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
Please note the line "6566/tcp open unknown", the port for saned is open.

Now on the client we may execute
Code:
scanimage -L
and if everything works we get informations about the device, for example:
Code:
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.
There is a 32bit version of xsane for Windows available, with this one can also use the scanner from a Windows-client.

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.


  



All times are GMT -5. The time now is 01:38 PM.

Main Menu
Advertisement

Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration