Herramientas de usuario

Herramientas del sitio


servidor:general:scanner_server

Configurar un servidor de scanner y clientes Win

Servidor:

Start with SANE (Scanning Access Now Easy), the scanning suite for Linux and other Unix-like systems. Check the project's list of supported devices. If your scanner is listed, most of the job is already done.

SANE consists of two packages, sane-backends and sane-frontends. The backends package includes scanner drivers and command-line interface (CLI) utilities for using the scanner. You'll want to install this package on both the server and the clients. The frontends package contains graphical and CLI-based front ends for the scanning process. We won't use this package, because we can use one of the more advanced front ends for SANE; more on that later.

Begin by installing the sane-backends package. Packages and ports are available for most Linux and BSD distributions. In Debian and Ubuntu the package is called sane-utils; Slackware and Arch simply name it sane. If you prefer building from source, it's a trivial ./configure; make; make install process. Documentation is provided in the source tarball. When the installation is done, check that your scanner is detected by running scanimage -L as root. The output of this command should look something like the following:

device `plustek:libusb:001:003' is a Epson Perfection 1260/Photo USB flatbed scanner

While you could run saned, the scanning daemon, as root, it's better to run it as a less privileged user, saned, instead, to improve security. If the saned user is not added by the package of your distribution, add it manually with the command:

if ! id saned; then groupadd saned; useradd -g saned -G scanner -s /bin/false -d /dev/null saned; fi

Add your non-root user to the scanner group with the command usermod -a -G username scanner.

If your Linux distribution uses UDEV for device node management – as most modern distributions do – you should reboot to ensure that the new udev rules for SANE are loaded and that you're able to scan as a non-root user. To verify that your system uses UDEV, check for the presence of the directory /dev/.udev and see whether the udevd process is running with the command ps aux | grep udevd. You can avoid rebooting and manually restart the udev daemon, but that's not very easy, so it's better to reboot. If your distribution uses static device nodes, take a look at SANE's README.linux file for more information on how to manually fix permissions and allow non-root users to access the scanner. Just to be sure that users other than root can access the scanner, run scanimage -L as the non-root user you previously added to the scanner group after you reboot; the output should be the same as before.

Now it's time to configure the saned daemon. Add the hostnames or IP addresses of the hosts you want to have access to the scanner to the file /etc/sane.d/saned.conf. If you want to provide access to all the computers on your network, just add your IP subnet – for example, if your IP address is 192.168.1.1, your subnet is probably 192.168.1.0/24.

Check that a sane-port line exists in /etc/services, or add the following line if it's not:

sane-port 6566/tcp # SANE network scanner daemon

Saned does not run as a standalone daemon and thus needs inetd (or xinetd) to work. Add the following line in your /etc/inetd.conf:

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

Now ask inetd to reload that file with the command kill -HUP `cat /var/run/inetd.pid` or your distribution's init script. The saned man page includes instructions on how to use xinetd instead of inetd or tcp_wrappers for more advanced control of access to saned.

The server should now be ready – time to configure the clients. Install the sane-backends (or sane-utils, or sane) package on the clients and add the hostname or IP address of the server in /etc/sane.d/net.conf. Running scanimage -L as root should return something like:

device `net:mars:plustek:libusb:001:003' is a Epson Perfection 1260/Photo USB flatbed scanner

(mars is the hostname of my scanner server.) Now add your non-root user to the scanner group, as before, and you're done.

From a security perspective this setup is wide open; anyone who can access the network could run denial-of-service attacks on your server or just start scans to drive you crazy. You should only share a scanner this way on a protected, firewalled local network.

There are lots of front ends for SANE for all major operating systems; have a look at the complete list in SANE's home page. I run XSane on my Linux and BSD desktops. If you use Windows on your clients I suggest using SaneTwain, since I've had the most successful results with it. I installed a scanner/printer server for a small business years ago and they still happily run SaneTwain on Windows 98 and XP clients without problems.

That's it, enjoy your new scanner server. You have one more reason to be proud of your home or small business network.

Fuente: How to share a scanner on your network
By Manolis Tzanidakis on October 27, 2006 (8:00:00 AM)
From: http://www.linux.com/archive/articles/57798

Cliente Win32:

After downloading SaneTwain (see below), unzip the files. Put ScanImage.exe anywhere you want, it is a stand-alone version of SaneTwain, more or less like xscanimage.

Put the SaneTwain.ds file in the twain_32 folder of your Windows system folder . If you don't have a twain_32 folder, your computer might not have TWAIN installed, see the TWAIN website for details on downloading the TWAIN Data Source Manager. Make sure the SaneTwain.ds file has execution rights set.

It is recommended to start ScanImage first, to set-up the connection to your SANE server. (Note: if you are using Windows NT or 2000, it is probably wise to run it the first time as Administrator). The first time the program is started, a properties window will be shown. This window can be recalled later using the the properties button. All settings in this window are stored in the sanetwain.ini file, which is stored in your user profile.

On the “Connection” tab, you can enter hostname and portnumber (the default is usually OK). Leave the “Get list of devices at startup” checkbox checked, so the software will retrieve a list of available devices. Then restart SaneTwain to take effect. Unless your SANE setup is not a default one, the username can also be left as PCUSER.

Fuente: http://sanetwain.ozuzo.net/

servidor/general/scanner_server.txt · Última modificación: 2009/11/17 12:26 por gkhaled