Re: Sharing a scanner from a Buster system

2021-03-08 Thread Dan Ritter
John Boxall wrote: 
> On 2021-03-07 12:47 p.m., Brad Rogers wrote:
> > On Sun, 7 Mar 2021 17:34:59 +
> > Brian  wrote:
> > 
> > Hello Brian,
> > 
> > > put it there because I tend to forget changes I make in /etc! In this
> > 
> > You're using a computer; you don't /need/ to remember those changes.
> > Use the computer to do it for you.
> > 
> > IOW, create a text file documenting those system additions you've made.
> > Put a link to the file on your desktop.  You'll never forget the document
> > is there.  Then, when you get curious enough to look at the file again,
> > your memory will be jogged.
> > 
> 
> Brad, I agree 100%..unfortunately, like my memory, I use selective
> action.sometimes I create one and other times :-)

If you install etckeeper, all the changes you make in /etc will
be stored in a version control system.

You can write comments to yourself with
etckeeper commit "message about what I am doing"

and you can list changes, revert them, and so forth.

etckeeper hooks itself in to apt so that when you do an upgrade
or an install, changes are added automatically.

-dsr-



Re: Sharing a scanner from a Buster system

2021-03-07 Thread Brad Rogers
On Sun, 7 Mar 2021 13:11:26 -0500
John Boxall  wrote:

Hello John,

>Brad, I agree 100%..unfortunately, like my memory, I use selective 
>action.sometimes I create one and other times :-)

Sadly, Me too.   :-(

-- 
 Regards  _
 / )   "The blindingly obvious is
/ _)radnever immediately apparent"
Life's short, don't make a mess of it
No Time To Be 21 - The Adverts


pgpFl81f6zB6E.pgp
Description: OpenPGP digital signature


Re: Sharing a scanner from a Buster system

2021-03-07 Thread Brian
On Sun 07 Mar 2021 at 13:07:54 -0500, John Boxall wrote:

> On 2021-03-07 12:45 p.m., Brian wrote:
> > On Sun 07 Mar 2021 at 17:34:59 +, Brian wrote:
> > 
> > John,
> > 
> > I forgot to ask before - and forgot again! What device are you using?
> > 
> 
> An Epson Perfection 2480 Photo.

An oldie! What you have done is the only way to to export this scanner
to the network. Hats off to the SANE project.
 
> So, having read a little further, maybe I could have used the Epson offering
> for a driver. I didn't because, well, I hadn't read further and because "it
> just worked" under Bullseye.

The epson2 free backend works for you. Stick with it.

> I haven't rebuilt the specific system in question to Buster yet, but on my
> test system with the scanner attached the bug report fix worked fine.

That is good to know. Debian + SANE + you work well together and for the
benefit of everyone..

-- 
Brian



Re: Sharing a scanner from a Buster system

2021-03-07 Thread John Boxall

On 2021-03-07 12:47 p.m., Brad Rogers wrote:

On Sun, 7 Mar 2021 17:34:59 +
Brian  wrote:

Hello Brian,


put it there because I tend to forget changes I make in /etc! In this


You're using a computer; you don't /need/ to remember those changes.
Use the computer to do it for you.

IOW, create a text file documenting those system additions you've made.
Put a link to the file on your desktop.  You'll never forget the document
is there.  Then, when you get curious enough to look at the file again,
your memory will be jogged.



Brad, I agree 100%..unfortunately, like my memory, I use selective 
action.sometimes I create one and other times :-)


--
Regards,

John Boxall



Re: Sharing a scanner from a Buster system

2021-03-07 Thread John Boxall

On 2021-03-07 12:45 p.m., Brian wrote:

On Sun 07 Mar 2021 at 17:34:59 +, Brian wrote:

John,

I forgot to ask before - and forgot again! What device are you using?



An Epson Perfection 2480 Photo.

So, having read a little further, maybe I could have used the Epson 
offering for a driver. I didn't because, well, I hadn't read further and 
because "it just worked" under Bullseye.


I haven't rebuilt the specific system in question to Buster yet, but on 
my test system with the scanner attached the bug report fix worked fine.


--
Regards,

John Boxall



Re: Sharing a scanner from a Buster system

2021-03-07 Thread Brad Rogers
On Sun, 7 Mar 2021 17:34:59 +
Brian  wrote:

Hello Brian,

>put it there because I tend to forget changes I make in /etc! In this

You're using a computer; you don't /need/ to remember those changes.
Use the computer to do it for you.

IOW, create a text file documenting those system additions you've made.
Put a link to the file on your desktop.  You'll never forget the document
is there.  Then, when you get curious enough to look at the file again,
your memory will be jogged.

-- 
 Regards  _
 / )   "The blindingly obvious is
/ _)radnever immediately apparent"
We're going to hell anyway, let's travel first class
Saturday Night - Kaiser Chiefs


pgp3SXYKdg259.pgp
Description: OpenPGP digital signature


Re: Sharing a scanner from a Buster system

2021-03-07 Thread Brian
On Sun 07 Mar 2021 at 17:34:59 +, Brian wrote:

John,

I forgot to ask before - and forgot again! What device are you using?

-- 
Brian.



Re: Sharing a scanner from a Buster system

2021-03-07 Thread Brian
On Sun 07 Mar 2021 at 12:07:30 -0500, John Boxall wrote:

> On 2021-03-05 12:04 p.m., Brian wrote:
> > 
> > Thank you, too. In the light of your issue, the Troubleshooting section
> > now has a link to the bug report. Hopefully, this will help users.
> > 
> 
> Brian, in the reference to the bug report, were you referring to the file:
> 
> /etc/udev/rules.d/65-libsane.rules
> 
> Contents:
> ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw
> $env{DEVNAME}"

I was.

> I suppose I could have changed /lib/udev/rules.d/60-libsane.rules to include
> that line. Not sure which is cleaner. If I upgrade the system from Buster to
> Bullseye the file I created would be redundant.
> 
> Thoughts?

Putting a file in /etc/udev/rules.d/ is, I believe, cleaner as it is an
addition to what the system provides. However, you (and I) know that the
buster /lib/udev/rules.d/60-libsane.rules cures the issue. Actually, I
put it there because I tend to forget changes I make in /etc! In this
case, I cannot envisage any harm would be done, but what the wiki says
and what a user might do are two different things; the wiki has to be
accurate.

-- 
Brian.



Re: Sharing a scanner from a Buster system

2021-03-07 Thread John Boxall

On 2021-03-05 12:04 p.m., Brian wrote:


Thank you, too. In the light of your issue, the Troubleshooting section
now has a link to the bug report. Hopefully, this will help users.



Brian, in the reference to the bug report, were you referring to the file:

/etc/udev/rules.d/65-libsane.rules

Contents:
ENV{libsane_matched}=="yes", RUN+="/bin/setfacl -m g:scanner:rw 
$env{DEVNAME}"



I suppose I could have changed /lib/udev/rules.d/60-libsane.rules to 
include that line. Not sure which is cleaner. If I upgrade the system 
from Buster to Bullseye the file I created would be redundant.


Thoughts?

--
Regards,

John Boxall



Re: Sharing a scanner from a Buster system

2021-03-05 Thread Brian
On Fri 05 Mar 2021 at 10:28:27 -0500, John Boxall wrote:

> On 2021-03-05 6:05 a.m., Brian wrote:
> 
> > > [1} 
> > > https://wiki.debian.org/SaneOverNetwork#Sharing_a_USB_Connected_Scanner:_the_Basics
> > 
> > The note on Bug #918358 towards the end of
> > 
> >https://wiki.debian.org/Scanner#perms
> > 
> > could help with a solution.
> > 
> 
> Once I looked at the bug report it most certainly did! Succinct and to the
> point.
> 
> Thank you!

Thank you, too. In the light of your issue, the Troubleshooting section
now has a link to the bug report. Hopefully, this will help users.

-- 
Brian.



Re: Sharing a scanner from a Buster system

2021-03-05 Thread John Boxall

On 2021-03-05 6:05 a.m., Brian wrote:


[1} 
https://wiki.debian.org/SaneOverNetwork#Sharing_a_USB_Connected_Scanner:_the_Basics


The note on Bug #918358 towards the end of

   https://wiki.debian.org/Scanner#perms

could help with a solution.



Once I looked at the bug report it most certainly did! Succinct and to 
the point.


Thank you!

--
Regards,

John Boxall



Re: Sharing a scanner from a Buster system

2021-03-05 Thread John Boxall

On 2021-03-05 4:50 a.m., David Pottage wrote:

David,

Thank you for the detailed instructions.

I hope this solves your problem. I struggled with that exact issue a 
couple of months ago, and I know how frustrating it can be.




It should. I will try it later today. The frustration was amplified 
because of my experience after using Bullseye and not needing to do any 
of it.


--
Regards,

John Boxall



Re: Sharing a scanner from a Buster system

2021-03-05 Thread John Boxall

On 2021-03-05 3:38 a.m., Darac Marjal wrote:

First of all, you might need to give us some hint as to how it doesn't
work? 

Agreed...bad form...no excuse.

"scanimage -L" on the client did not show the scanner whereas on the 
server it did. I tried from both root and non-root users.



"doesn't work" could range from "can't see the scanner at all" to
"always produces a black image" to  "inexplicably fills the room with
rabid weasels".


Based on this (from the reference) "The server will now be sharing the 
USB connected scanner with other designated machines on the network. " I 
would have expected to be able to see the scanner on the client in the 
scanimage output without having to do anything else. On the Bullseye 
instance the scanimage output did show the scanner with no additional steps.


Thank you for the feedback.

--
Regards,

John Boxall



Re: Sharing a scanner from a Buster system

2021-03-05 Thread Brian
On Thu 04 Mar 2021 at 18:38:09 -0500, John Boxall wrote:

> I have been trying for some time to setup a system that will share an
> attached scanner over the network. I had hoped to use Buster as it is still
> the stable instance of Debian. I have followed everything in [1] but I could
> never get it to work. I then tried Bullseye and it worked right away. Today
> I decided to install a clean NETINST image of each and repeat the "server"
> steps as outlined at [1].
> 
> Even though the howto states that it covers Debian from versions 8 to 11, I
> could not get it to work on Buster (10). The process failed on Buster,
> again, even though scanimage on the system saw the USB scanner (Epson
> Perfection 2480 Photo). I then installed Bullseye. The exact same process
> and the very same saned.conf file worked immediately.
> 
> The client was the same in both cases (Buster).
> 
> Is there a tweak that I am missing? Has there been a change that isn't in
> Buster but has made it to Bullseye? Any recommendations on debug steps would
> be appreciated?
> 
> 
> [1} 
> https://wiki.debian.org/SaneOverNetwork#Sharing_a_USB_Connected_Scanner:_the_Basics

The note on Bug #918358 towards the end of

  https://wiki.debian.org/Scanner#perms

could help with a solution.

-- 
Brian.



Re: Sharing a scanner from a Buster system

2021-03-05 Thread David Pottage

On 2021-03-04 23:38, John Boxall wrote:

I have been trying for some time to setup a system that will share an
attached scanner over the network. I had hoped to use Buster as it is
still the stable instance of Debian. I have followed everything in [1]
but I could never get it to work. I then tried Bullseye and it worked
right away. Today I decided to install a clean NETINST image of each
and repeat the "server" steps as outlined at [1].

Even though the howto states that it covers Debian from versions 8 to
11, I could not get it to work on Buster (10). The process failed on
Buster, again, even though scanimage on the system saw the USB scanner
(Epson Perfection 2480 Photo). I then installed Bullseye. The exact
same process and the very same saned.conf file worked immediately.

The client was the same in both cases (Buster).

Is there a tweak that I am missing? Has there been a change that isn't
in Buster but has made it to Bullseye? Any recommendations on debug
steps would be appreciated?


I suspect the tweak you are missing is the permissions on the scanner 
device so that the saned daemon can access it.


I have a network shared scanner on my Debian buster system (With an 
Ubuntu client), and had trouble getting it to work.


Firstly, make sure can you access the scanner locally as root, and can 
scan an image via the command line.


Then you need to set the ACL permissions on your scanner so that the 
username 'scanner' that the saned daemon uses can access the device in 
order to share it over the network. The Debian docs [2] for a scanner 
have the necessary commands to identify your scanner on the USB bus, and 
set the ACL on it.


For my scanner, the command I used was:

setfacl -m g:scanner:rw- /dev/bus/usb/003/002

Your scanner is probably connected to a different USB socket, so for you 
the command will be different.


Then restart the saned daemon, and test connectivity from your client 
machine.


If that works then you need to make the change permanent (otherwise it 
will be lost when you reboot). For that you will need to add a custom 
udev rule so that the kernel will recognise the device as a scanner 
during boot up device enumeration or when you connect it. The notes on 
how to do this came from the Arch Linux wiki. [3]


From the sane-find-scanner output, make a note of the Device id & vendor 
id for your scanner, and then prepare a new udev rule file:


/etc/udev/rules.d/49-sane-missing-scanner.rules

Mine contains the identification for my scanner (HP ScanJet 3300c), 
Yours will be different:


ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="0205", MODE="0664", 
GROUP="scanner", ENV{libsane_matched}="yes"



I hope this solves your problem. I struggled with that exact issue a 
couple of months ago, and I know how frustrating it can be.


[2] https://wiki.debian.org/Scanner
[3] https://wiki.archlinux.org/index.php/SANE#Permission_problem


--
David Pottage



Re: Sharing a scanner from a Buster system

2021-03-05 Thread Darac Marjal

On 04/03/2021 23:38, John Boxall wrote:
> I have been trying for some time to setup a system that will share an
> attached scanner over the network. I had hoped to use Buster as it is
> still the stable instance of Debian. I have followed everything in [1]
> but I could never get it to work. I then tried Bullseye and it worked
> right away. Today I decided to install a clean NETINST image of each
> and repeat the "server" steps as outlined at [1].
>
> Even though the howto states that it covers Debian from versions 8 to
> 11, I could not get it to work on Buster (10). The process failed on
> Buster, again, even though scanimage on the system saw the USB scanner
> (Epson Perfection 2480 Photo). I then installed Bullseye. The exact
> same process and the very same saned.conf file worked immediately.
>
> The client was the same in both cases (Buster).
>
> Is there a tweak that I am missing? Has there been a change that isn't
> in Buster but has made it to Bullseye? Any recommendations on debug
> steps would be appreciated?

First of all, you might need to give us some hint as to how it doesn't
work?  For example, what's the output of "scanimage -L" on the client
system? If you run something like "xsane", what happens?

"doesn't work" could range from "can't see the scanner at all" to
"always produces a black image" to  "inexplicably fills the room with
rabid weasels".

>
>
> [1}
> https://wiki.debian.org/SaneOverNetwork#Sharing_a_USB_Connected_Scanner:_the_Basics
>



OpenPGP_signature
Description: OpenPGP digital signature