Saturday, May 30, 2009

Setting up a network scanner using SANE

SANE is scanning software for Linux. It stands for Scanning Access Now Easy. It can act as a server with Linux package (x)inetd, so a computer can use the scanner connected to a different computer. And it is INsaneLY tedious and time consuming to set up.

I have my HP 4180 printer/scanner connected to my desktop/Mythbuntu machine, and my laptop can use the scanner. To set this up, first ensure your desktop connected to the scanner can in fact scan. If it can't the first thing to check is SANE is installed. This will install it if not already there -
#apt-get install sane-utils

Now ordinary users must be able to scan, so go to System-Administration-Users and Groups be sure your user name is a member of the scanners group.

There are multiple versions of (x)inetd. It is a software package that spawns a program or process when a request comes in from the network. It is probably not installed, so I would recommend using xinetd not inetd. To install -
#apt-get install xinetd

Now to open the configuration file of xinetd
# sudo nano /etc/xinetd.conf

Copy and paste the following into it -
service sane-port
{
port = 6566
socket_type = stream
wait = no
user = (your user name, or check the user name in the group saned)
group = saned
server = /usr/sbin/saned
}

Now open /etc/sane.d/saned.conf and put in the computer names, IP addresses, or IP address ranges that may access the scanner. My favorite is to do it like so if you would like to allow any computer with the IP address 192.168.1.0 to 192.168.1.254 to access the printer -
192.168.1.0/24

Finally restart xinetd
# /etc/init.d/xinetd restart

On the laptop, open /etc/sane.d/net.conf and type the name or IP address of your desktop with the scanner.

You should now be able to open SANE on the laptop and it will find, and be able to scan from your scanner connected to your desktop. This was compiled from a lot of sources, but the most helpful was

No comments:

Post a Comment