Changes

From SME Server
Jump to navigationJump to search
3,423 bytes removed ,  11:23, 9 April 2008
remove config now in smeserver-sane
Line 57: Line 57:  
  scanimage -d plustek:libusb:001:002 --format tiff -l 0 -t 0 -x 215 -y 297 > outfile.tiff
 
  scanimage -d plustek:libusb:001:002 --format tiff -l 0 -t 0 -x 215 -y 297 > outfile.tiff
   −
====Configuring xinetd to run SANE unattended====
  −
After succesfull installation and testing it is time to configure xinetd so SANE will run as a service on your server.
  −
  −
<ol>
  −
<li>Create a group using the server-manager of your SME Server to hold the users that will be allowed to use the scanner application. In this instruction it is assumed that the group will be called saned.</li>
  −
<li>One of the first steps we need to do is to add a entry to the internal configuration database to hold the configuration parameters of the saned service daemon with the following commands:
  −
<pre>db configuration set sane-port service
  −
db configuration setprop sane-port TCPPort 6566
  −
db configuration setprop sane-port status enabled</pre>
  −
<!---db configuration setprop sane-port access private--->
  −
</li>
  −
<li>Create a custom template fragment by issuing the following commands:
  −
<pre>mkdir -p /etc/e-smith/templates-custom/etc/xinetd.conf/</pre>
  −
<pre>nano /etc/e-smith/templates-custom/etc/xinetd.conf/30sane</pre>
  −
  −
Copy the following section in this file:
  −
<pre>
  −
{
  −
  −
$OUT = <<HERE;
  −
  −
service sane-port
  −
{
  −
port = 6566
  −
socket_type = stream
  −
protocol = tcp
  −
user = root
  −
group = saned
  −
wait = no
  −
server = /usr/sbin/saned
  −
}
  −
HERE
  −
}
  −
</pre>
  −
  −
Expand the configuration file:
  −
<pre>expand-template /etc/xinetd.conf</pre>
  −
</li>
  −
<li>We also allow all systems on the network to be able to access the service, this is done by adding another template, with the following commands:
  −
<pre>mkdir -p /etc/e-smith/templates-custom/etc/hosts.allow
  −
nano /etc/e-smith/templates-custom/etc/hosts.allow/sane</pre>
  −
  −
Copy the following section into the file:
  −
<pre>
  −
{
  −
    $DB->hosts_allow_spec('saned');
  −
}
  −
</pre>
  −
Expand the configuration file:
  −
<pre>expand-template /etc/hosts.allow</pre>
  −
</li>
  −
<li>
  −
Now we need to configure the service using the following commands:
  −
<pre>mkdir -p /etc/e-smith/templates-custom/etc/services/
  −
nano /etc/e-smith/templates-custom/etc/services/saned</pre>
  −
  −
Add the following line to the file:
  −
<pre>sane-port      { ${'sane-port'}{TCPPort} }/tcp              # SANE network scanner daemon</pre>
  −
Expand the configuration file:
  −
<pre>expand-template /etc/services</pre>
  −
</li>
  −
<li>
  −
Now we need to configure saned.conf using the following commands:
  −
<pre>nano /etc/sane.d/saned.conf</pre>
  −
Add the following lines to the file:
  −
<pre>localhost
  −
adresse-ip_client1
  −
adresse_ip_client2</pre>
  −
</li>
  −
<li>Make a link to allow xinetd to start during the server startup:
  −
<pre>ln -s /etc/init.d/xinetd /etc/rc.d/rc7.d/S50xinetd</pre>
  −
</li>
  −
<li>Now we can start the server with the following command:
  −
<pre>/etc/init.d/xinetd restart</pre>
  −
</li>
  −
</ol>
      
=== Uninstall ===  
 
=== Uninstall ===  
 
You can remove SANE from your SME Server with the following command
 
You can remove SANE from your SME Server with the following command
  yum remove sane-backends  
+
  rpm -e sane-backends smeserver-sane libieee1284 xinetd
<!---
  −
====Determine scanner resolution====
  −
 
  −
scanimage --help | grep -m 1 resolution
  −
 
  −
 
  −
=== Adding your scanner to the network ===
  −
 
  −
saned is the SANE daemon. It gives an access to the image acquisition device available on the local host to remote clients.
  −
 
  −
====Updating of /etc/hosts.allow for sane====
  −
 
  −
Make in /etc/ hosts.allow a line with template-custom
  −
 
  −
mkdir -p /etc/e-smith/templates-custom/etc/hosts.allow/
  −
 
  −
nano /etc/e-smith/templates-custom/etc/hosts.allow/saned
  −
  =>
  −
  saned: 127.0.0.1 10.97.1.0/255.255.255.0
  −
 
  −
(10.97.1.0 => your ip)
  −
 
  −
  /sbin/e-smith/expand-template /etc/hosts.allow
  −
 
  −
====Updating of /etc/services for sane====
     −
Make in /etc/services a line with template-custom
     −
  mkdir -p /etc/e-smith/templates-custom/etc/services/
+
===Updating of /etc/hosts.allow for sane===
   −
  nano /etc/e-smith/templates-custom/etc/services/saned
+
Add the IP addresses of the computers which are authorized to use the scanner
  =>
  −
  sane 6566/tcp # SANE network scanner daemon
     −
   expand-template /etc/services
+
   nano /etc/e-smith/templates/etc/sane.d/saned.conf/30local
 +
 +
  adress-ip_1
 +
  adress_ip_2
   −
====Add the IP addresses of the computers which are authorized to use the scanner====
+
  expand-template /etc/sane.d/saned.conf
   −
  nano /etc/sane.d/saned.conf
  −
  =>
  −
  localhost
  −
  adress-ip_customer1
  −
  adress_ip_customer2
  −
--->
   
==Client==
 
==Client==
  

Navigation menu