The scanner server does not work as the printer server, that is you will not be able to use your windows scanner programs and drivers. The scanner needs to be supported by the Linux SANE software that is running on Bubba http://www.sane-project.org/. To access the scanner from windows you need to install a scanner program that is capable to talk to the sane server. One such program is the windows port of xsane http://www.xsane.org/xsane-win32.html I have not tried this myself.
1) Installing the necessary scanner software. This is done with running the following command as root. Note that almost every command in this how to needs to be run by root.
Code: Select all
apt-get install libsane-extras sane-utils
Code: Select all
scanimage -L
If not your scanner is probably not supported by the sane scanner program and then I have no idea on what to do.ryz:~# scanimage -L
device `epkowa:libusb:001:004' is a Epson PM-A820 flatbed scanner
3) Now it is time to see if your scanner device gets the right permission. This is done by running
Code: Select all
ls -l /dev/bus/usb/<number1>/<number2>
The important part here is the word that I made bold and underlined. If it does not say scanner but rather lp the Bubba does not correctly recognise your scanner as an scanner. If Bubba correctly detects your scanner you can move on to section 5 else you should start with section 4ryz:~# ls -l /dev/bus/usb/001/004
crw-rw-r-- 1 root scanner 189, 3 2009-02-20 23:00 /dev/bus/usb/001/004
4) Fixing permission
If Bubba does not correctly recognise your scanner you need to edit the config files for udev. Udev is the demon that tries to figure out what devices is pluged in to Bubba and take the correct actions. Run
Code: Select all
nano /etc/udev/libsane-extras.rules
Code: Select all
SYSFS{idVendor}=="<vendor_number>", SYSFS{idProduct}=="<product_number>", MODE="664", GROUP="scanner"
Code: Select all
sane-find-scanner
The important line is the one marked in bold. So the line I added wasryz:~# sane-find-scanner
# sane-find-scanner will now attempt to detect your scanner. If the
# result is different from what you expected, first make sure your
# scanner is powered up and properly connected to your computer.
# No SCSI scanners found. If you expected something different, make sure that
# you have loaded a kernel SCSI driver for your SCSI adapter.
found USB scanner (vendor=0x04b8 [EPSON], product=0x0827 [USB2.0 MFP(Hi-Speed)]) at libusb:001:004
# Your USB scanner was (probably) detected. It may or may not be supported by
# SANE. Try scanimage -L and read the backend's manpage.
# Not checking for parallel port scanners.
# Most Scanners connected to the parallel port or other proprietary ports
# can't be detected by this program.
After this an reboot of Bubba is needed which is easiest done with runningSYSFS{idVendor}=="04b8", SYSFS{idProduct}=="0827", MODE="0664", GROUP="scanner"
Code: Select all
reboot
Code: Select all
ls -l /dev/bus/usb/<number1>/<number2>
5) Adding the scanner group to the saned user.
Every user that shall be able to access the scanner needs to belong to the scanner group. Since you should not run the saned server as the root user but rather the by the added saned user, which was added when installing the sane tools, you need to add the scanner group to the saned user. This is done with the following command
Code: Select all
adduser saned scanner
Default saned does not allow anyone to connect to it over the network so we need to configure who should be able to connect. This is done by editing
Code: Select all
nano /etc/sane.d/saned.conf
7) Installing and configuring xinetd
Since the saned server is not a demon that is a program that should be runing all the time but rather only when some one connects to Bubba for scanning we need some demon that listens for connections and start the saned server when it finds one. This is where xinetd comes in since its purpose is to listen to incoming connections and when it finds one to start the correct program. I have to confess that I do not have the full knowledge of xinetd and especially not how the default install of xinetd is set up. Hopefully it is set up in an secure way and does not listen to any connections at all so that the only connections it will listen to is the one that we will configure. But since your computer should be behind an god firewall anyway it should probably be safe but i do not promise anything.
Install xinetd with
Code: Select all
apt-get install xinetd
Code: Select all
nano /etc/xinetd.conf
The we need to tell xinietd to re read its configuration this is done with# description: The sane server accepts requests
# for network access to a local scanner via the
# network.
service sane-port
{
port = 6566
socket_type = stream
wait = no
protocol = tcp
user = saned
group = scanner
disable = no
server = /usr/sbin/saned
}
Code: Select all
/etc/init.d/xinetd restart
8) Installing and configure the Ubuntu 8.10 client.
If you have an other distribution the method might differ. First we should install the sane-utils if it is not already installed. It Might be installed in the default configuration I do not remember. This is done by runing the following command as an user. In Ubuntu you do not change to the user root instead you use the sudo command to run commands as root.
Code: Select all
sudo apt-get install sane-utils
Code: Select all
sudo nano /etc/sane.d/net.conf
Code: Select all
sudo adduser $USER scanner
Code: Select all
scanimage -L
Code: Select all
sudo apt-get install xsane