July 22, 2014
 
 
RSSRSS feed

Use Networked Printers and Scanners with HPLIP - page 3

HP vs. Samsung Smackdown

  • August 20, 2007
  • By Carla Schroder

Sharing a scanner over the network has limited value, because most folks don't find it convenient to gallop great distances back and forth between their computers and scanners. But it's not so bad sharing a scanner between a few computers that are in reasonable proximity to each other, and then the person using the PC that the scanner is attached to gets pestered only a little instead of a lot.

The first step is making sure your scanner works for ordinary users and doesn't require root privileges. Linux's new best friend udev has turned device permissions into a New Fun Headache, so hopefully your distribution ships with a nice udev configuration that neither vexes nor annoys, but does the work for you. As, presumably, it is designed to do. On Ubuntu all you do is add local users to the scanner group. On other distributions who knows; see Manage Linux Hardware with udev for some pointers on making udev bow to your will.

Now you need to make sure that saned, the Linux scanner daemon, is installed on the PC that the scanner is connected to, which we'll call the server. On Debian this comes in the sane-utils package, and on Fedora it's in sane-frontends. Then you control it from either inetd or xinetd. inetd users need a line like this in /etc/inetd.conf:

sane-port stream tcp nowait saned.saned /usr/sbin/saned saned

This assumes that your saned user and group are both saned. If they're something else, change the saned.saned bit.

In /etc/xinetd.conf, use these lines:

 service sane-port
{ port = 6566 socket_type = stream wait = no user = saned group = saned server = /usr/sbin/saned }

Again, adjust your user and group if necessary.

Now you need a couple of saned tweaks on both the clients and the server. On the server edit /etc/sane.d/saned.conf to include IP addresses, an address range, or hostnames of allowed PCs like this:

# local hostnames
 debianpad
 xena
 stinkpad

# or just give a subnet range
 192.168.1.0/24 

Then on client machines edit /etc/sane.d/net.conf to include the hostname or address of the scanner:

 uberpc 

On the server, restart (x)inetd:

 # /etc/init.d/xinetd restart


Figure 1. Kooka Finds a Networked Scanner

Now fire up your favorite scanner software on the client. Kooka will show a window like Figure 1.

Hurrah! Success! Now you can scan in comfort from your own computer. Xsane has a Windows version, so that's a good option for Windows clients. Configure the client file the same way as on Linux, except the slashes tip the wrong way, so you're editing C:\sane\etc\saned.d\net.conf.

What about directly-connected network scanners, like the HP 3052? Use either Zeroconf, or configure your clients just like for scanners attached to Linux PCs. Check out your EWS or HP Toolbox for configuration and access controls.

Resources

Sitemap | Contact Us