Server & Client are both peppermint 3
Hi again
Just to keep you updated
I followed the tutorial posted by SeZo Building a scan server on Ubuntu Server 12.04 | Richard's Blog but still no luck
I had previously looked at that tutorial but decided not follow it at first it because it looked more complicated in particular this part
At this point we need to make sure that saned can access the scanner. I did this by setting up a udev rule to arrange for the permissions on the underlying device to be set so saned can access it. For my convenience I also set up a “well known” symbolic name (/dev/scanner) to the scanner device too, as that base device can change depending on what is plugged into the server at any point in time; I’m pretty sure saned doesn’t require this though. I achieved this by making the new file /etc/udev/rules.d/90-scanner.rules contain the single line: ATTRS{idVendor}==”04a9″,ATTRS{idProduct}==”2206″,SYMLINK+=”scanner”,MODE=”0660″,OWNER=”root”,GROUP=”saned”
I’m not sure whether I should have added the idVendor & idProduct inside the brackets or put them inside inverted commas ( it would go a long way if people writing these tutorials would realise that we don’t all understand the finer points of syntax) but anyway I did it like this
ATTRS{ID 05d8:4002 }==”04a9″,ATTRS{ScanMagic 1200 UB Plus Scanner }==”2206″,SYMLINK+=”scanner”,MODE=”0660″,OWNER=”root”,GROUP=”saned”
other than that the tutorial seemed simple enough to follow and I carried out each instruction on both server & client
Many thanks for your help
Graeme
IF, and I repeat IF you needed a udev rule at all (which I doubt if xsane finds the scanner), it should have read:-
and if the Vendor:Product ID string from lsusb read 05d8:4002
ATTRS{idVendor}==”05d8″,ATTRS{idProduct}==”4002″,SYMLINK+=”scanner”,MODE=”0660″,OWNER=”root”,GROUP=”saned”
I’ll have a go at this in a bit.
can you post the output from:
dpkg -l | grep xinetd
Can you also post the contents of:
gedit /etc/sane.d/net.conf
from the client.
and:
gedit /etc/xinetd.d/saned
from the server.
–
Client
chloe@Linux2 ~ $ dpkg -l | grep xinetd
chloe@Linux2 ~ $
gedit /etc/sane.d/net.conf
# This is the net backend config file.net backend options
Timeout for the initial connection to saned. This will prevent the backend
from blocking for several minutes trying to connect to an unresponsive
saned host (network outage, host down, …). Value in seconds.
connect_timeout = 20
Server
gedit /etc/xinetd.d/saned
Shows an empty file
Cracked it on my HP AiO (Server = Ubuntu 11.10 … Client = Peppermint 3
(I had to add saned to the lp group … but I’m not sure that’s necessary for your separate scanner)
on ALL PC’s … make sure sane is installed:
sudo apt-get install sane
On the SERVER … run:
sudo apt-get install xinetd
then
sudo gedit /etc/xinetd.d/saned
and make it read:-
service sane-port
{
port = 6566
socket_type = stream
server = /usr/sbin/saned
protocol = tcp
user = saned
group = saned
wait = no
disable = no
}
SAVE the file, and run:
sudo service xinetd restart
then
sudo service saned restart
now see what happens if you fire up Xsane on the client.
if still nothing … on the SERVER run:
sudo -s
then
su -s /bin/bash saned
then
scanimage -L
What’s the output from that last command ?
Hint -
to exit to a normal prompt, just run
exit
twice … or just close the terminal and repoen.
–
graeme@Linux3 ~ $ sudo -s [sudo] password for graeme: Linux3 ~ # su -s /bin/bash saned saned@Linux3 /home/graeme $ scanimage -LNo scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
saned@Linux3 /home/graeme $
Needless to say still no joy
Close the terminal and reopen it.
Then run:
sudo adduser saned lp
now what’s the output if you run:
sudo -s
then
su -s /bin/bash saned
then
scanimage -L
service saned { socket_type = stream server = /usr/sbin/saned protocol = tcp user = saned group = scanner wait = no disable = no }
graeme@Linux3 ~ $ sudo gedit /etc/xinetd.d/saned
[sudo] password for graeme:
graeme@Linux3 ~ $ sudo adduser saned lp
Adding user `saned' to group `lp' ...
Adding user saned to group lp
Done.
graeme@Linux3 ~ $ sudo -s
Linux3 ~ # su -s /bin/bash saned
saned@Linux3 /home/graeme $ scanimage -L
No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
saned@Linux3 /home/graeme $
On the SERVER …
Run:
sudo gedit /etc/xinetd.d/saned
and make it read:-
service sane-port
{
port = 6566
socket_type = stream
server = /usr/sbin/saned
protocol = tcp
user = saned
group = saned
wait = no
disable = no
}
SAVE the file, then REBOOT
Now what’s the output from:
sudo -s
then
su -s /bin/bash saned
then
scanimage -L
Ok I’ve edited the /etc/xinetd.d/saned file, but unfortunately I can’t reboot as I’m doing this via Team Viewer and I won’t physically get at the PC’s till I finish work
Unless there’s another way we can do it ?
Graeme
did you ever add that udev rule ?
what’s the output from:
ls -a /etc/udev/rules.d
did you ever add that udev rule ?
Yes but I didn’t make the corrections to the idVendor & idProduct
EDIT
Here’s the output
graeme@Linux3 ~ $ ls -a /etc/udev/rules.d
. 70-persistent-cd.rules 90-scanner.rules README
.. 70-persistent-net.rules 90-scanner.rules~
graeme@Linux3 ~ $
a) that udev rule may not be necessary … and may even be getting in the way.
b) you’d have to restart udev for the changes to apply
sudo service udev restart
Ever considered adding a REALLY strict static password to Teamviewer, then setting it to autostart at bootup
delete those 2 files:
sudo rm -v /etc/udev/rules.d/90-scanner.rules
and
sudo rm -v /etc/udev/rules.d/90-scanner.rules~
restart udev
sudo service udev restart
Now what’s the output from:
groups saned
now let’s check again if saned has permission to access the scanner …run:
sudo -s
then
su -s /bin/bash saned
then
scanimage -L
What’s the output from that last command ?
I’m happy to delete the udev rule if you thinks it’s really not necessary, but if you think I should keep it do you want me to correct the syntax re idProduct & idVendor ?
see above
graeme@Linux3 ~ $ groups saned
saned : saned lp
graeme@Linux3 ~ $
saned@Linux3 /home/graeme $ scanimage -L
No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).
saned@Linux3 /home/graeme $
what’s the output from:
lsusb
graeme@Linux3 ~ $ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 005: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub / D-Link DUB-H4 USB 2.0 Hub
Bus 001 Device 006: ID 058f:6377 Alcor Micro Corp. Multimedia Card Reader
Bus 002 Device 002: ID 04b8:0005 Seiko Epson Corp. Printer
Bus 002 Device 003: ID 1d57:32da
Bus 003 Device 002: ID 05d8:4002 Ultima Electronics Corp. Artec Ultima 2000 (GT6801 based)/Lifetec LT9385/ScanMagic 1200 UB Plus Scanner
Bus 001 Device 007: ID 03f0:3807 Hewlett-Packard
graeme@Linux3 ~ $
OK, let’s try putting it back with the correct permissions.
Run:
sudo gedit /etc/udev/rules.d/90-scanner.rules
and make it read:-
SUBSYSTEMS=="usb", ATTRS{idVendor}==”05d8″, ATTRS{idProduct}==”4002″, ENV{libsane_matched}="yes",
MODE=”0660″, OWNER=”root”, GROUP=”saned”
(that’s all one line, so copy/paste)
now reload udev:
sudo service udev restart
now let’s check again if saned has permission to access the scanner …run:
sudo -s
then
su -s /bin/bash saned
then
scanimage -L
What’s the output from that last command ?