Re: [sane-devel] improve scanbd for Debian

2014-12-17 Thread Thorsten Müller
Am Mittwoch, 17. Dezember 2014, 16:47:31 schrieb Rolf Leggewie:
 On 12.12.2014 13:58, Wilhelm wrote:
  Be sure that scanbd uses the correct location of libsane config
  files
  (see ReadMe). In most cases this will be a seperate directory (e.g.
  /etc/scanbd) where all configs and dll.conf are. This dll.conf must
  not contain the net-backend.
  
  On the other hand the standard libsane config location (/etc/sane)
  has to contain a dll.conf with only the net backend.
  
  I changed trunk to include an additional debug output to log the
  env-var SANE_CONFIG_DIR. Please check the startup-script if the
  right dir ist set ...
 
 SANE_CONFIG_DIR is set to /etc/scanbd.  The dll.conf files were not
 set up according to above requirements but when I changed them that
 way everything stopped working, including scanbd from the command
 line or even scanimage -L.  sane-find-scanner would continue to
 find the device, though.
 
 Before I attempted to change things, /etc/scanbd/dll.conf contained
 ONLY the net backend and /etc/sane.d/dll.conf contained a whole bunch
 of backends including genesys and net.
 
 I've managed to get /etc/scanbd/dll.conf to contain ONLY the genesys
 backend (dropped the net backend) without breaking anything that was
 previously working.  Now it's on to get saned to work over the network
 which I remember from a few years ago when I did this for actually
 scanning across the LAN to be a horrible config nightmare.
 
 I will need to look into how to make that part work as expected and
 then I will need to figure out how to make sure that the Debian users
 have a proper setup.  This will be complicated since it involves the
 configuration files for a separate package.
 
 On 12.12.2014 15:32, Simon Matter wrote:
  Given that you were unable to see any difference I started a re-run
  and inserted some markers into syslog with the logger command to
  make sure I will be able to gather what happened when this time. 
  From what I understand now, it seems that the scanner is indeed
  NOT recognized.  How can that come about, especially given that on
  a call from the command-line things work just fine with the same
  configuration? 
  That sounds like a kind of permission problem. Is there something
  like udev granting access to the device for locally logged in users
  which does not happen when started iva init?
 
 Simon, permissions problem was my first thought as well.  But I had
 run a few tests already and kind of ruled that out.  This included
 setting user and group in scanbd.conf to root.root.  I verified with
 ps that scanbd was indeed running as the root user but even then the
 buttons did not trigger a reaction.
 
 When I call scanbd from the command line the script does not switch to
 the saned user.  It only does this (for understandable reasons) when
 called as sudo scanbd -f.  But even then, the buttons work.

I found this thread just now. It's a good thing you try to build a 
debian package for scanbd. For my own purposes, I built a dabian package 
from scanbd to work on my Kubuntu 12.04 LTS system that sets up 
everything to work as expected. If you are interested, I could mail the 
*.debian.tar.gz file so you can check out what I did to make things 
work. My local scanner is a Canon LiDE 210 which uses the genesys 
backend as well, so your setup should be very similar to mine.

My package depends on libsane 1.0.24 or higher since earlier versions 
don't supoprt the five front panel buttons on my LiDE 210.

The package is built with scanbd 1.4.0

Greetings
Thorsten

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] improve scanbd for Debian

2014-12-17 Thread Wilhelm
Am 17.12.2014 um 12:29 schrieb Thorsten Müller:
 Am Mittwoch, 17. Dezember 2014, 16:47:31 schrieb Rolf Leggewie:
 On 12.12.2014 13:58, Wilhelm wrote:
 Be sure that scanbd uses the correct location of libsane config
 files
 (see ReadMe). In most cases this will be a seperate directory (e.g.
 /etc/scanbd) where all configs and dll.conf are. This dll.conf must
 not contain the net-backend.

 On the other hand the standard libsane config location (/etc/sane)
 has to contain a dll.conf with only the net backend.

 I changed trunk to include an additional debug output to log the
 env-var SANE_CONFIG_DIR. Please check the startup-script if the
 right dir ist set ...

 SANE_CONFIG_DIR is set to /etc/scanbd.  

good

 The dll.conf files were not
 set up according to above requirements but when I changed them that
 way everything stopped working, including scanbd from the command
 line or even scanimage -L.  

what stopped working?

 sane-find-scanner would continue to
 find the device, though.

without SANE_CONFIG_DIR=/etc/scanbd? should not happen (s. ReadMe), but

SANE_CONFIG_DIR=/etc/scanbd scanimage -L

should list the scanner.


 Before I attempted to change things, /etc/scanbd/dll.conf contained
 ONLY the net backend 

wrong

 and /etc/sane.d/dll.conf contained a whole bunch
 of backends including genesys and net.

wrong: should only contain net backend

So, it looks like you swapped the config: please read the ReadMe carefully.

All - also local - clients must use the net-backend! This is because the
real device is locked due to scanbd polling the buttons. If a network
connection arrives (from local or remote client), scanbm (or scanbd -m)
stops scanbd from polling, releasing the devices an starts saned.

 I've managed to get /etc/scanbd/dll.conf to contain ONLY the genesys
 backend (dropped the net backend) without breaking anything that was
 previously working.  Now it's on to get saned to work over the network
 which I remember from a few years ago when I did this for actually
 scanning across the LAN to be a horrible config nightmare.

 I will need to look into how to make that part work as expected and
 then I will need to figure out how to make sure that the Debian users
 have a proper setup.  This will be complicated since it involves the
 configuration files for a separate package.

 On 12.12.2014 15:32, Simon Matter wrote:
 Given that you were unable to see any difference I started a re-run
 and inserted some markers into syslog with the logger command to
 make sure I will be able to gather what happened when this time. 
 From what I understand now, it seems that the scanner is indeed
 NOT recognized.  How can that come about, especially given that on
 a call from the command-line things work just fine with the same
 configuration? 
 That sounds like a kind of permission problem. Is there something
 like udev granting access to the device for locally logged in users
 which does not happen when started iva init?

 Simon, permissions problem was my first thought as well.  But I had
 run a few tests already and kind of ruled that out.  This included
 setting user and group in scanbd.conf to root.root.  I verified with
 ps that scanbd was indeed running as the root user but even then the
 buttons did not trigger a reaction.

 When I call scanbd from the command line the script does not switch to
 the saned user.  It only does this (for understandable reasons) when
 called as sudo scanbd -f.  But even then, the buttons work.
 
 I found this thread just now. It's a good thing you try to build a 
 debian package for scanbd. For my own purposes, I built a dabian package 
 from scanbd to work on my Kubuntu 12.04 LTS system that sets up 
 everything to work as expected. If you are interested, I could mail the 
 *.debian.tar.gz file so you can check out what I did to make things 
 work. My local scanner is a Canon LiDE 210 which uses the genesys 
 backend as well, so your setup should be very similar to mine.
 
 My package depends on libsane 1.0.24 or higher since earlier versions 
 don't supoprt the five front panel buttons on my LiDE 210.
 
 The package is built with scanbd 1.4.0
 
 Greetings
 Thorsten
 


-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] improve scanbd for Debian

2014-12-11 Thread Rolf Leggewie
On 11.12.2014 15:39, Wilhelm wrote:
 Well, I see for in syslog.log
 
 Nov 15 19:08:43 localhost scanbd: scanbd: exec for
 /usr/share/scanbd/scripts/copy.script
 Nov 15 19:08:43 localhost scanbd: scanbd: execlp: No such file or directory
 
 which meens that your script isn't found ... but the action is triggered
 from the scanner (once in this log).


Hello Wilhelm,

thank you for the quick response.  Like I said, the binary package and
my installation still has many rough edges.  They will need to be dealt
with one at a time, in the proper order.

The part you refer to is the one that is actually working, where the
call to the script at least happens.  Maybe the script does not exist
but that is irrelevant at this time because I want to start scanbd from
init but it doesn't even try to call any script (existing or
non-existing).  It only does that when I call it from the command-line.

Lines 71 to 503 are the ones that show the call where button presses do
not trigger any kind of response.

Regards

Rolf


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] improve scanbd for Debian

2014-12-11 Thread Wilhelm
Am 11.12.2014 um 12:47 schrieb Rolf Leggewie:
 On 11.12.2014 15:39, Wilhelm wrote:
 Well, I see for in syslog.log

 Nov 15 19:08:43 localhost scanbd: scanbd: exec for
 /usr/share/scanbd/scripts/copy.script
 Nov 15 19:08:43 localhost scanbd: scanbd: execlp: No such file or directory

 which meens that your script isn't found ... but the action is triggered
 from the scanner (once in this log).
 
 
 Hello Wilhelm,
 
 thank you for the quick response.  Like I said, the binary package and
 my installation still has many rough edges.  They will need to be dealt
 with one at a time, in the proper order.
 
 The part you refer to is the one that is actually working, where the
 call to the script at least happens.  Maybe the script does not exist
 but that is irrelevant at this time because I want to start scanbd from
 init but it doesn't even try to call any script (existing or
 non-existing).  It only does that when I call it from the command-line.

Ok, understand.

Actually I have no debian system at hand ...

Did you try all buttons or only option[34] file?

 
 Lines 71 to 503 are the ones that show the call where button presses do
 not trigger any kind of response.
 
 Regards
 
 Rolf
 
 


-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] improve scanbd for Debian

2014-12-11 Thread Rolf Leggewie
On 11.12.2014 21:00, Wilhelm wrote:
 Actually I have no debian system at hand ...
 
 Did you try all buttons or only option[34] file?

Wilhelm, thank you for the quick response again.

I wonder if this is Debian-specific and you'd need access to a Debian
system.  Other Debian users did report the same symptoms, though.

I can crank up the debug-logging to level 7 and rerun the test, but I
felt it was giving me too much.  Currently there is nothing in the log
to give any clue as to what is going wrong in one case but not the
other? What could I do to get that information?  Any hunch as to what
might be the problem?  The scanner is actually being recognized by
scanbd in both cases.


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] improve scanbd for Debian

2014-12-11 Thread Rolf Leggewie
On 11.12.2014 21:00, Wilhelm wrote:
 Did you try all buttons or only option[34] file?

During the time of recording the log I sent previously I did not try all
buttons.  But in the numerous previous troubleshooting sessions I tried
every single button at least once. None of them would ever give me any
reaction at times when scanbd had been started from init.


-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] improve scanbd for Debian

2014-12-11 Thread Wilhelm
Hi Rolf,

Am 11.12.2014 um 12:47 schrieb Rolf Leggewie:
 On 11.12.2014 15:39, Wilhelm wrote:
 Well, I see for in syslog.log

 Nov 15 19:08:43 localhost scanbd: scanbd: exec for
 /usr/share/scanbd/scripts/copy.script
 Nov 15 19:08:43 localhost scanbd: scanbd: execlp: No such file or directory

 which meens that your script isn't found ... but the action is triggered
 from the scanner (once in this log).
 
 
 Hello Wilhelm,
 
 thank you for the quick response.  Like I said, the binary package and
 my installation still has many rough edges.  They will need to be dealt
 with one at a time, in the proper order.
 
 The part you refer to is the one that is actually working, where the
 call to the script at least happens.  Maybe the script does not exist
 but that is irrelevant at this time because I want to start scanbd from
 init but it doesn't even try to call any script (existing or
 non-existing).  It only does that when I call it from the command-line.
 
 Lines 71 to 503 are the ones that show the call where button presses do
 not trigger any kind of response.
 

I must admit, actually I have no idea whar ist going wrong here. I see
that the scanner and all options are recognized as in the
call-from-shell case. So, the buttons presses (value changes) should be
recognized as well ...

On my system (arch linux) there are no problems ...

Wilhelm

-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


Re: [sane-devel] improve scanbd for Debian

2014-12-11 Thread Rolf Leggewie
On 12.12.2014 05:07, Wilhelm wrote:
 I must admit, actually I have no idea whar ist going wrong here. I see
 that the scanner and all options are recognized as in the
 call-from-shell case.

Wilhelm, thank you for having a look.  I must admit that the logs were
gotten a few weeks ago.  It is quite possible that my memory of what I
was doing at what point in time was faulty.  My apologies about that. I
am only starting to learn how to decipher the logs on my own (totally
impossible feat at log level 7, hahaha).

Given that you were unable to see any difference I started a re-run and
inserted some markers into syslog with the logger command to make sure I
will be able to gather what happened when this time.  From what I
understand now, it seems that the scanner is indeed NOT recognized.  How
can that come about, especially given that on a call from the
command-line things work just fine with the same configuration?

FTR, I started scandbd from the command-line, waited a few seconds and
then pressed each button once.  This seems to have been successful.  In
the case of init, I started the program via the services command,
realized the scanner was NOT recognized, unplugged and replugged it and
then pressed all buttons (even though apparently the scanner had not
been recognized).

Regards

Rolf


scanbd.new-log.tar.bz2
Description: application/bzip
-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] improve scanbd for Debian

2014-12-11 Thread Wilhelm
Am 12.12.2014 um 03:27 schrieb Rolf Leggewie:
 On 12.12.2014 05:07, Wilhelm wrote:
 I must admit, actually I have no idea whar ist going wrong here. I see
 that the scanner and all options are recognized as in the
 call-from-shell case.
 
 Wilhelm, thank you for having a look.  I must admit that the logs were
 gotten a few weeks ago.  It is quite possible that my memory of what I
 was doing at what point in time was faulty.  My apologies about that. I
 am only starting to learn how to decipher the logs on my own (totally
 impossible feat at log level 7, hahaha).
 
 Given that you were unable to see any difference I started a re-run and
 inserted some markers into syslog with the logger command to make sure I
 will be able to gather what happened when this time.  From what I
 understand now, it seems that the scanner is indeed NOT recognized.  How
 can that come about, especially given that on a call from the
 command-line things work just fine with the same configuration?

Be sure that scanbd uses the correct location of libsane config files
(see ReadMe). In most cases this will be a seperate directory (e.g.
/etc/scanbd) where all configs and dll.conf are. This dll.conf must not
contain the net-backend.

On the other hand the standard libsane config location (/etc/sane) has
to contain a dll.conf with only the net backend.

I changed trunk to include an additional debug output to log the env-var
SANE_CONFIG_DIR. Please check the startup-script if the right dir ist
set ...

 
 FTR, I started scandbd from the command-line, waited a few seconds and
 then pressed each button once.  This seems to have been successful.  In
 the case of init, I started the program via the services command,
 realized the scanner was NOT recognized, unplugged and replugged it and
 then pressed all buttons (even though apparently the scanner had not
 been recognized).
 
 Regards
 
 Rolf
 
 
 


-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org


[sane-devel] improve scanbd for Debian

2014-12-10 Thread Rolf Leggewie
Hello group,

I'm happy to manage to get scanbd into Debian and replace scanbuttond.
The package still has many rough edges and even for me as Maintainer
does not work perfectly.  My local setup includes a Canon LiDE 35
connected over USB. scanbd generally works fine when called straight
from the command line as scanbd -f even for an ordinary user.  Buttons
are recognized and scripts called.

I recently added the upstream init script to the package (patched to
include a call to status) and that doesn't seem to work properly.  My
machine runs Ubuntu Trusty and sysvrc.  scanbd seems to start up fine
from init as verified with ps faux.

saned21838  0.0  0.0  33252  1552 ?Sl   13:35   0:00
  \_ /usr/sbin/scanbd -c /etc/scanbd/scanbd.conf

But there is no reaction to button presses on the scanner.  I have
uploaded one log with successful button presses when the program is
started directly by the user and one where the program is started from
init and no reactions occur. Hopefully someone can spot something in
there or otherwise suggest something for triage to move this along.

I also reported this as https://bugs.launchpad.net/bugs/1401389

The attached tar-file contains the log from the console in
scanbd.console-log and from syslog in scanbd-syslog.log

First is a startup via init (19:00:53 to 19:07:46, lines 71 to 503).
This is followed by a call to scanbd straight from the user command line
(19:08:04 to 19:08:56, lines 504 to 1999). The Canon device is found in
both cases (19:07:42, line 84 and 19:08:07, line 517). A file button
press is registered at 19:08:42 that triggers the copy.script (line
1655). Line numbers refer to the syslog since only that one has time-stamps.

Regards

Rolf


scanbd.log.tar.bz2
Description: application/bzip
-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org

Re: [sane-devel] improve scanbd for Debian

2014-12-10 Thread Wilhelm
Am 11.12.2014 um 07:51 schrieb Rolf Leggewie:
 Hello group,
 
 I'm happy to manage to get scanbd into Debian and replace scanbuttond.
 The package still has many rough edges and even for me as Maintainer
 does not work perfectly.  My local setup includes a Canon LiDE 35
 connected over USB. scanbd generally works fine when called straight
 from the command line as scanbd -f even for an ordinary user.  Buttons
 are recognized and scripts called.

Well, I see for in syslog.log

Nov 15 19:08:43 localhost scanbd: scanbd: exec for
/usr/share/scanbd/scripts/copy.script
Nov 15 19:08:43 localhost scanbd: scanbd: execlp: No such file or directory

which meens that your script isn't found ... but the action is triggered
from the scanner (once in this log).


 
 I recently added the upstream init script to the package (patched to
 include a call to status) and that doesn't seem to work properly.  My
 machine runs Ubuntu Trusty and sysvrc.  scanbd seems to start up fine
 from init as verified with ps faux.
 
 saned21838  0.0  0.0  33252  1552 ?Sl   13:35   0:00
   \_ /usr/sbin/scanbd -c /etc/scanbd/scanbd.conf
 
 But there is no reaction to button presses on the scanner.  I have
 uploaded one log with successful button presses when the program is
 started directly by the user and one where the program is started from
 init and no reactions occur. Hopefully someone can spot something in
 there or otherwise suggest something for triage to move this along.
 
 I also reported this as https://bugs.launchpad.net/bugs/1401389
 
 The attached tar-file contains the log from the console in
 scanbd.console-log and from syslog in scanbd-syslog.log
 
 First is a startup via init (19:00:53 to 19:07:46, lines 71 to 503).
 This is followed by a call to scanbd straight from the user command line
 (19:08:04 to 19:08:56, lines 504 to 1999). The Canon device is found in
 both cases (19:07:42, line 84 and 19:08:07, line 517). A file button
 press is registered at 19:08:42 that triggers the copy.script (line
 1655). Line numbers refer to the syslog since only that one has time-stamps.
 
 Regards
 
 Rolf
 
 
 


-- 
Wilhelm
w.me...@unix.net

-- 
sane-devel mailing list: sane-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject unsubscribe your_password
 to sane-devel-requ...@lists.alioth.debian.org