Setting up a scannning server using Linuxmint 15 and Canon LIDE 25
Setting up a scanning server using Linuxmint and Canon LIDE 25 scanner
It took me a day to figure out how this works, looking back, it should have taken only less than a hour if I know all these, here are the steps I should have taken:
Make sure scanner works
Connect Canon LIDE 25 to the linuxmint box, under ‘Graphic’ there is ‘Simple Scan’, run it, if you can scan a document, then the hardware is in place.
open a terminal, run : scanimage -L
device `plustek:libusb:003:004' is a Canon CanoScan LiDE25 flatbed scanner
the number 003:004 varies depends on which USB port the scanner got connected.
To do a test scan from command line:
Share the scanner over the net
sudo pico /etc/default/saned
# Set to yes to start saned RUN=yes # Set to the user saned should run as RUN_AS_USER=root
Since the pc is purely for scanning, running as root should not be too much a problem for now. and this is quite important, not changing it will cause the rest of steps to fail.
sudo pico /etc/sane.d/saned.conf
add this line:
this will allow all pcs in the subnet to have access to the scanner.
restart the service:
sudo service saned restart
now the server part is ready, you can connect to this from other workstations either in linux, os x and windows. for os x, I have tested snac, you have to install twainsane related packages first. for windows.
here is the steps for a linux to share the scanner in Centos:
1) install xsane if not yet.
2) sudo pico /etc/sane.d/net.conf
add following line:
that’s the ip of address of linuxmint box with scanner
device `net:192.168.1.126:plustek:libusb:003:004' is a Canon CanoScan LiDE25 flatbed scanner
it means your connection to the remote server is working, usually due to some permission issue, this will fail, that’s the reason I changed RUN_AS_USER to root instead of sane.
3) run xsane (usually under graphics)
this should bring up a scanning window
Operate the scanning with buttons
It is more convenient to scan a doc by pressing a button, here is a package for doing that: scanbuttond, you can find it in linuxmint’s software package and install it, as usual, change the user in /etc/default/scanbuttond:
# Set to yes to start scanbuttond RUN=yes # Set to the user scanbuttond should run as RUN_AS_USER=root
sudo service scanbuttond restart
tail -f /var/log/syslog
press scanner’s buttons, you should see some entries in logs
you can put your own scripts in the /etc/scanbuttod folder, named it buttonpressed.sh, it will be called once button is pressed.
to test it, run it this way first:
sudo scanbuttond -f
until your script works, then run the service from init.d