Assumptions:
- Your scanner is installed properly and fully function. If you need to install your scanner first, have a look at the ScanningHowTo. To check if your scanner is connected and installed properly you can use the command "scanimage -L".
- The machine we're configuring to use as the scanner server has the ip address 192.168.1.1 and subnet-mask 255.255.255.0. This means that this machine is on the 192.168.1.0/24 (CIDR notation) network/subnet.
Preparation:
Install the package sane-utils:
Server-side setup:Code:sudo apt-get install sane-utils
Open /etc/default/saned with a text editor:
Set RUN to yes and save and exit the file.Code:gksudo gedit /etc/default/saned
The file should look like this:
open /etc/sane.d/saned.conf with a text editor:Code:# Defaults for the saned initscript, from sane-utils # Set to yes to start saned RUN=yes # Set to the user saned should run as RUN_AS_USER=saned
Find the following section and modify it using the ip and netmask settings of your scanner server. Also amend if you only want certain hosts to be able to use the scanner:Code:gksudo gedit /etc/sane.d/saned.conf
(Re)start the saned daemon:Code:## Access list # A list of host names, IP addresses or IP subnets (CIDR notation) that # are permitted to use local SANE devices. IPv6 addresses must be enclosed # in brackets, and should always be specified in their compressed form. # # The hostname matching is not case-sensitive. #scan-client.somedomain.firm #192.168.0.1 192.168.1.0/24 #[2001:7a8:185e::42:12] #[2001:7a8:185e::42:12]/64
Add the saned user to the lp group so it can access the scanner:Code:sudo service saned restart
Client-side setup:Code:sudo adduser saned lp
On each client computer you want to give access to the scanner, open the /etc/sane.d/net.conf with a text editor:
and add the ip-address or hostname to the end of the file.Code:gksudo gedit /etc/sane.d/net.conf
it should look something like this:
You should now be able to access the scanner using Simple Scan, XSane, etc.Code:## saned hosts # Each line names a host to attach to. # If you list "localhost" then your backends can be accessed either # directly or through the net backend. Going through the net backend # may be necessary to access devices that need special privileges. # localhost 192.168.1.1
Web interface:
In order to provide a web interface for your scanner (which could be useful for guests), install the packages netpbm tesseract-ocr-eng apache2:
Configure the web server:Code:sudo apt-get install netpbm tesseract-ocr-eng apache2
Setup Apache2 to allow CGI scripts to run:
Allow CGI scripts to be executed in /var/www/:Code:echo 'AddHandler cgi-script .cgi' | sudo tee -a /etc/apache2/apache2.conf
Restart the apache2 web server:Code:sudo sed -i.bak 's/FollowSymLinks MultiViews/FollowSymLinks MultiViews ExecCGI/g' /etc/apache2/sites-available/default
Installing scanner server:Code:sudo service apache2 restart
Change to the /var/www/ folder:
Download the scan server archive:Code:cd /var/www
Unzip the archive:Code:sudo wget http://www.openubuntu.com/downloads/ftp/PHP-Server-Scanner-1.2-3.tar.bz2
Delete the archive:Code:sudo tar xvf scan*.tar
Connecting to scanner server:Code:sudo rm scan*.tar
You can access the server using its ip address following by /scan. In our case:
Links:Code:http://192.168.1.1/scan
Home / Howto / Linux / scanner / ubuntu / HOWTO: Share a scanner on your network in Karmic Koala/Lucid Lynx
Subscribe to:
Post Comments (Atom)
Post a Comment
Post a Comment