[sane-devel] scanbd problem with dbus permission ?

2013-02-25 Thread stout
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

Something strange happened :

2 months ago,I managed to get scanbd to work perfectly with my epson
V500 scanner, built my own script, ..., was very proud of myself...

... until today, where after 2 months of not using it, I tried to use
a button, and it did not work !!
I must have changed something, during those 2 months, but I really
don't know what...

So, the scanner is plugged in a Debian 6,
the debug log shows these errors :

scanbd: start dbus thread
scanbd: Not Primary Owner (-1)
scanbd: Name Error (Connection ":1.8" is not allowed to own the
service "de.kmux.scanbd.server" due to security policies in the
configuration

and later :

scanbd: polling device Perfection V500
scanbd: epson-vphoto-backend: communication error: read length:0
(expected:1)

(the full log is pasted afterwards)

I tried to modify the user/group in scanbd.conf (trying lp, saned,
scanner, root..) with no change.

The UDEV rule for the scanner seems to make it belong to the "scanner"
group :
ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0130", MODE="0664",
GROUP="scanner", ENV{libsane_matched}="yes"

Don't hesitate to ask me for more informations if needed...

Thanks for your help !

best regards

stout


here is the full log :

scanbd -f
scanbd: debug on: level: 7
scanbd: dropping privs to uid saned
scanbd: dropping privs to gid scanner
scanbd: group scanner has member:
scanbd: saned
scanbd: root
scanbd: lp
scanbd: drop privileges to gid: 113
scanbd: Running as effective gid 113
scanbd: drop privileges to uid: 109
scanbd: Running as effective uid 109
scanbd: dbus_init
scanbd: dbus match type='signal',interface='org.freedesktop.Hal.Manager'
scanbd: Loading /usr/local/lib/scanbd/scanbuttond/backends/meta.so
scanbd: meta-backend: init
scanbd: libusbi: initializing...
scanbd: Loading /usr/local/lib/scanbd/scanbuttond/backends/hp3500.so
scanbd: meta-backend: attaching backend: HP3500 USB
scanbd: hp3500-backend: init
scanbd: Loading /usr/local/lib/scanbd/scanbuttond/backends/snapscan.so
scanbd: meta-backend: attaching backend: Snapscan USB
scanbd: snapscan-backend: init
scanbd: Loading /usr/local/lib/scanbd/scanbuttond/backends/niash.so
scanbd: meta-backend: attaching backend: Niash USB
scanbd: niash-backend: init
scanbd: Loading /usr/local/lib/scanbd/scanbuttond/backends/epson_vphoto.so
scanbd: meta-backend: attaching backend: Epson VX00 Photo USB
scanbd: epson-vphoto-backend: init
scanbd: meta-backend: attached scanner "Epson Perfection V500"
scanbd: Scanning for local-only devices
scanbd: found device: Perfection V500 Epson epkowa:interpreter:001:004
scanbd: start_scbtn_threads
scanbd: start the threads (1)
scanbd: Starting poll thread for Perfection V500
scanbd: Thread started for device Perfection V500
scanbd: scbtn_poll
scanbd: start dbus thread
scanbd: Not Primary Owner (-1)
scanbd: Name Error (Connection ":1.8" is not allowed to own the
service "de.kmux.scanbd.server" due to security policies in the
configuration file)
scanbd: found 4 options for device Perfection V500
scanbd: sane_find_matching_options
scanbd: no matching actions in section (null)
scanbd: sane_find_matching_functions
scanbd: scanbuttond backends can't use function definitions
scanbd: found 1 local device sections
scanbd: checking device section V500 with filter: (.*V500.*)
scanbd: found 4 local action for device Perfection V500 [V500]
scanbd: sane_find_matching_options
scanbd: found 4 actions in section V500
scanbd: checking action scan with filter: ^web.*
scanbd: scanbtnd_button_name (1)
scanbd: scanbtnd_button_name, backend: Epson VX00 Photo USB
scanbd: found active option[0] web for device Perfection V500
scanbd: installing action scan (0) for Perfection V500, option[0]: web
as: myV500.script
scanbd: multiple actions allowed
scanbd: scanbtnd_button_name (2)
scanbd: scanbtnd_button_name, backend: Epson VX00 Photo USB
scanbd: found active option[1] email for device Perfection V500
scanbd: scanbtnd_button_name (3)
scanbd: scanbtnd_button_name, backend: Epson VX00 Photo USB
scanbd: found active option[2] copy for device Perfection V500
scanbd: scanbtnd_button_name (4)
scanbd: scanbtnd_button_name, backend: Epson VX00 Photo USB
scanbd: found active option[3] send for device Perfection V500
scanbd: checking action email with filter: ^copy.*
scanbd: scanbtnd_button_name (1)
scanbd: scanbtnd_button_name, backend: Epson VX00 Photo USB
scanbd: found active option[0] web for device Perfection V500
scanbd: scanbtnd_button_name (2)
scanbd: scanbtnd_button_name, backend: Epson VX00 Photo USB
scanbd: found active option[1] email for device Perfection V500
scanbd: scanbtnd_button_name (3)
scanbd: scanbtnd_button_name, backend: Epson VX00 Photo USB
scanbd: found active option[2] copy for device Perfection V500
scanbd: installing action email (1) for Perfection V500, option[2]:
copy as: myV500.script
scanbd: multiple actions allowed
scanbd: scanbtnd_button_name (4)
scanbd: scanbtnd_button_name, backend: Epson VX00 Photo 

[sane-devel] [PATCH] Add support to snapscan for Benq Scanwit 2720S film scanner

2013-02-25 Thread Andrew Goodbody
On 25/02/13 11:07, Paul Menzel wrote:
> Dear Andrew,
>
>
> thank you for working on finishing the support.
>
> Am Montag, den 25.02.2013, 10:00 + schrieb Andrew Goodbody:
>
> [?]
>
> What is the current status?

I would call it at least 'Good'. I have used this code to scan over a 
hundred negatives. But then only I have used it. Others may want 
something else. I am open to adding to it although I would prefer to get 
an initial implementation committed before doing so.

> My comments are inline.

And my answers also.

>> ---
>>   backend/snapscan-options.c |  223 +---
>>   backend/snapscan-scsi.c|  309 
>> ++--
>>   backend/snapscan-sources.c |   31 -
>>   backend/snapscan.c |  133 ++-
>>   backend/snapscan.h |   28 +++-
>>   5 files changed, 597 insertions(+), 127 deletions(-)
>>
>> diff --git a/backend/snapscan-options.c b/backend/snapscan-options.c
>> index a7401bb..674c8d2 100644
>> --- a/backend/snapscan-options.c
>> +++ b/backend/snapscan-options.c
>> @@ -1,9 +1,9 @@
>>   /* sane - Scanner Access Now Easy.
>>
>> -   Copyright (C) 1997, 1998, 2001 Franck Schnefra, Michel Roelofs,
>> +   Copyright (C) 1997, 1998, 2001, 2013 Franck Schnefra, Michel Roelofs,
>>  Emmanuel Blot, Mikko Tyolajarvi, David Mosberger-Tang, Wolfgang Goeller,
>>  Petter Reinholdtsen, Gary Plewa, Sebastien Sable, Mikael Magnusson,
>> -   Oliver Schwartz and Kevin Charter
>> +   Andrew Goodbody, Oliver Schwartz and Kevin Charter
>>
>>  This file is part of the SANE package.
>>
>> @@ -67,11 +67,15 @@
>>   static SANE_Int def_rgb_lpr = 4;
>>   static SANE_Int def_gs_lpr = 12;
>>   static SANE_Int def_bpp = 8;
>> +static SANE_Int def_frame_no = 1;
>>
>>
>>   /* predefined preview mode name */
>>   static char md_auto[] = "Auto";
>>
>> +/* predefined focus mode name */
>> +static char md_manual[] = "Manual";
>> +
>>   /* predefined scan mode names */
>>   static char md_colour[] = SANE_VALUE_SCAN_MODE_COLOR;
>>   static char md_bilevelcolour[] = SANE_VALUE_SCAN_MODE_HALFTONE;
>> @@ -103,6 +107,15 @@ static char lpr_desc[] = SANE_I18N(
>>   "a scan; if it's set too high, X-based frontends may stop responding "
>>   "to X events and your system could bog down.");
>>
>> +static char frame_desc[] = SANE_I18N(
>> +"Frame number of media holder that should be scanned.");
>> +
>> +static char focus_mode_desc[] = SANE_I18N(
>> +"Use manual or automatice selection of focus point.");
>
> 1. automatic

Done, thanks.

>> +
>> +static char focus_desc[] = SANE_I18N(
>> +"Focus point for scanning.");
>> +
>>   /* ranges */
>>   static const SANE_Range x_range_fb =
>>   {
>> @@ -174,6 +187,16 @@ static const SANE_Range y_range_tpo_2580 =
>>   SANE_FIX (0.0), SANE_FIX (80.0), 0
>>   };/* mm */
>>
>> +/* TPO range for the Scanwit 2720S */
>
> TPO? Turn page over [1] ? Could you enlighten me please? It?s used for
> the other devices too and search the Web did not help.
>
> [1] http://en.wikipedia.org/wiki/TPO
>
> Found it in `snapscan.h`.
>
>  typedef enum
>  {
>  SRC_FLATBED = 0,/* Flatbed (normal) */
>  SRC_TPO,/* Transparency unit */
>  SRC_ADF
>  } SnapScan_Source;
>
>> +static const SANE_Range x_range_tpo_2720s =
>> +{
>> +SANE_FIX (0.0), SANE_FIX (23.6), 0
>> +};/* mm */
>> +static const SANE_Range y_range_tpo_2720s =
>> +{
>> +SANE_FIX (0.0), SANE_FIX (35.7), 0
>> +};/* mm */
>> +
>>   /* TPO range for the Epson 3490 */
>>   static const SANE_Range x_range_tpo_3490 =
>>   {
>> @@ -198,6 +221,14 @@ static const SANE_Range lpr_range =
>>   {
>>   1, 50, 1
>>   };
>> +static const SANE_Range frame_range =
>> +{
>> +1, 6, 1
>> +};
>> +static const SANE_Range focus_range =
>> +{
>> +0, 0x300, 6
>> +};
>>
>>   static const SANE_Range brightness_range =
>>   {
>> @@ -243,6 +274,8 @@ static void init_options (SnapScan_Scanner * ps)
>>   {10, 50, 75, 100, 150, 200, 300, 400, 600, 800, 1600};
>>   static SANE_Word resolutions_2400[] =
>>   {10, 50, 75, 100, 150, 200, 300, 400, 600, 1200, 2400};
>> +static SANE_Word resolutions_2700[] =
>> +{4, 337, 675, 1350, 2700};
>>   static SANE_Word resolutions_3200[] =
>>   {15, 50, 150, 200, 240, 266, 300, 350, 360, 400, 600, 720, 800, 
>> 1200, 1600, 3200};
>>   static SANE_String_Const names_all[] =
>> @@ -253,6 +286,8 @@ static void init_options (SnapScan_Scanner * ps)
>>   {md_auto, md_colour, md_bilevelcolour, md_greyscale, md_lineart, 
>> NULL};
>>   static SANE_String_Const preview_names_basic[] =
>>   {md_auto, md_colour, md_greyscale, md_lineart, NULL};
>> +static SANE_String_Const focus_modes[] =
>> +{md_auto, md_manual, NULL};
>>   static SANE_Int bit_depth_list[4];
>>   int bit_depths;
>>   SANE_Option_Descriptor *po = ps->options;
>> @@ -287,6 +322,

[sane-devel] [PATCH] Add support to snapscan for Benq Scanwit 2720S film scanner

2013-02-25 Thread Paul Menzel
Dear Andrew,


thank you for working on finishing the support.

Am Montag, den 25.02.2013, 10:00 + schrieb Andrew Goodbody:

[?]

What is the current status?

My comments are inline.

> ---
>  backend/snapscan-options.c |  223 +---
>  backend/snapscan-scsi.c|  309 
> ++--
>  backend/snapscan-sources.c |   31 -
>  backend/snapscan.c |  133 ++-
>  backend/snapscan.h |   28 +++-
>  5 files changed, 597 insertions(+), 127 deletions(-)
> 
> diff --git a/backend/snapscan-options.c b/backend/snapscan-options.c
> index a7401bb..674c8d2 100644
> --- a/backend/snapscan-options.c
> +++ b/backend/snapscan-options.c
> @@ -1,9 +1,9 @@
>  /* sane - Scanner Access Now Easy.
>  
> -   Copyright (C) 1997, 1998, 2001 Franck Schnefra, Michel Roelofs,
> +   Copyright (C) 1997, 1998, 2001, 2013 Franck Schnefra, Michel Roelofs,
> Emmanuel Blot, Mikko Tyolajarvi, David Mosberger-Tang, Wolfgang Goeller,
> Petter Reinholdtsen, Gary Plewa, Sebastien Sable, Mikael Magnusson,
> -   Oliver Schwartz and Kevin Charter
> +   Andrew Goodbody, Oliver Schwartz and Kevin Charter
>  
> This file is part of the SANE package.
>  
> @@ -67,11 +67,15 @@
>  static SANE_Int def_rgb_lpr = 4;
>  static SANE_Int def_gs_lpr = 12;
>  static SANE_Int def_bpp = 8;
> +static SANE_Int def_frame_no = 1;
>  
>  
>  /* predefined preview mode name */
>  static char md_auto[] = "Auto";
>  
> +/* predefined focus mode name */
> +static char md_manual[] = "Manual";
> +
>  /* predefined scan mode names */
>  static char md_colour[] = SANE_VALUE_SCAN_MODE_COLOR;
>  static char md_bilevelcolour[] = SANE_VALUE_SCAN_MODE_HALFTONE;
> @@ -103,6 +107,15 @@ static char lpr_desc[] = SANE_I18N(
>  "a scan; if it's set too high, X-based frontends may stop responding "
>  "to X events and your system could bog down.");
>  
> +static char frame_desc[] = SANE_I18N(
> +"Frame number of media holder that should be scanned.");
> +
> +static char focus_mode_desc[] = SANE_I18N(
> +"Use manual or automatice selection of focus point.");

1. automatic

> +
> +static char focus_desc[] = SANE_I18N(
> +"Focus point for scanning.");
> +
>  /* ranges */
>  static const SANE_Range x_range_fb =
>  {
> @@ -174,6 +187,16 @@ static const SANE_Range y_range_tpo_2580 =
>  SANE_FIX (0.0), SANE_FIX (80.0), 0
>  };/* mm */
>  
> +/* TPO range for the Scanwit 2720S */

TPO? Turn page over [1] ? Could you enlighten me please? It?s used for
the other devices too and search the Web did not help.

[1] http://en.wikipedia.org/wiki/TPO

Found it in `snapscan.h`.

typedef enum
{
SRC_FLATBED = 0,/* Flatbed (normal) */
SRC_TPO,/* Transparency unit */
SRC_ADF
} SnapScan_Source;

> +static const SANE_Range x_range_tpo_2720s =
> +{
> +SANE_FIX (0.0), SANE_FIX (23.6), 0
> +};/* mm */
> +static const SANE_Range y_range_tpo_2720s =
> +{
> +SANE_FIX (0.0), SANE_FIX (35.7), 0
> +};/* mm */
> +
>  /* TPO range for the Epson 3490 */
>  static const SANE_Range x_range_tpo_3490 =
>  {
> @@ -198,6 +221,14 @@ static const SANE_Range lpr_range =
>  {
>  1, 50, 1
>  };
> +static const SANE_Range frame_range =
> +{
> +1, 6, 1
> +};
> +static const SANE_Range focus_range =
> +{
> +0, 0x300, 6
> +};
>  
>  static const SANE_Range brightness_range =
>  {
> @@ -243,6 +274,8 @@ static void init_options (SnapScan_Scanner * ps)
>  {10, 50, 75, 100, 150, 200, 300, 400, 600, 800, 1600};
>  static SANE_Word resolutions_2400[] =
>  {10, 50, 75, 100, 150, 200, 300, 400, 600, 1200, 2400};
> +static SANE_Word resolutions_2700[] =
> +{4, 337, 675, 1350, 2700};
>  static SANE_Word resolutions_3200[] =
>  {15, 50, 150, 200, 240, 266, 300, 350, 360, 400, 600, 720, 800, 
> 1200, 1600, 3200};
>  static SANE_String_Const names_all[] =
> @@ -253,6 +286,8 @@ static void init_options (SnapScan_Scanner * ps)
>  {md_auto, md_colour, md_bilevelcolour, md_greyscale, md_lineart, 
> NULL};
>  static SANE_String_Const preview_names_basic[] =
>  {md_auto, md_colour, md_greyscale, md_lineart, NULL};
> +static SANE_String_Const focus_modes[] =
> +{md_auto, md_manual, NULL};
>  static SANE_Int bit_depth_list[4];
>  int bit_depths;
>  SANE_Option_Descriptor *po = ps->options;
> @@ -287,6 +322,10 @@ static void init_options (SnapScan_Scanner * ps)
> y_range_tpo = y_range_tpo_2480;
>  }
>  break;
> +case SCANWIT2720S:
> +x_range_tpo = x_range_tpo_2720s;
> +y_range_tpo = y_range_tpo_2720s;
> +break;
>  case PERFECTION3490:
>  x_range_tpo = x_range_tpo_3490;
>  y_range_tpo = y_range_tpo_3490;
> @@ -318,6 +357,7 @@ static void init_options (SnapScan_Scanner * ps)
>  po[OPT_MODE_GROUP].cap = 0;
>  po[OPT_MODE_GROUP].constraint_type =

[sane-devel] gscan2pdf v1.1.3 released

2013-02-25 Thread Jeffrey Ratcliffe
gscan2pdf - A GUI to produce a multipage PDF or DjVu from a scan.

http://gscan2pdf.sourceforge.net/

Only two clicks are required to scan several pages and then save all or a
selection as a PDF or DjVu file, including metadata if required.

gscan2pdf can control regular or sheet-fed (ADF) scanners with SANE via
libsane-perl, scanimage or scanadf, and can scan multiple pages at
once. It presents a
thumbnail view of scanned pages, and permits simple operations such as
cropping, rotating and deleting pages.

OCR can be used to recognise text in the scans, and the output
embedded in the PDF or DjVu.

PDF conversion is done by PDF::API2.

The resulting document may be saved as a PDF, DjVu, multipage TIFF file, or
single page image file.


Changelog for 1.1.3:

* Added missing arguments to 'changed-progress' signal emission.
* Fix bug preventing import after error.
  Closes bug 155 (can't enter correct file name after incorrect file name)
* Fixed bug introduced in v1.1.2 causing only one page to be scanned
  when all requested
* Fixed bug introduced in v1.1.2 causing two pages to be scanned
  when only one requested



[sane-devel] Support for Benq Scanwit 2720S [patch]

2013-02-25 Thread Andrew Goodbody
On 25/02/13 08:51, Paul Menzel wrote:
> Dear Andrew, dear Oliver,
>
> why not discuss this publicly on this list too.
>
> 1. People having a BenQ ScanWit 2720S might join the discussion and test
> the patches too.
>
> 2. It is archived too in the case of some hardware failure and missing
> backup.
>
>
> Thanks,
>
> Paul
>

Patch attached.

Andrew
-- next part --
A non-text attachment was scrubbed...
Name: 0001-Add-support-to-snapscan-for-Benq-Scanwit-2720S-film-.patch
Type: text/x-patch
Size: 47403 bytes
Desc: not available
URL: 
<http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130225/b80c7f20/attachment-0001.bin>


[sane-devel] Support for Benq Scanwit 2720S

2013-02-25 Thread Andrew Goodbody
Hi Oliver,

Good to hear from you. I just resent my patch to you.

Andrew

On 25/02/13 08:15, Oliver Schwartz wrote:
> Andrew,
>
> I'm sorry, but I haven't received any emails from you lately. The last 
> message I got from you is from January 26th.
>
> Can you please resent your emails, I'll double check for any over-eager spam 
> filter.
>
> Kind regards,
>
> Oliver
>
>> I was working with Oliver Schwartz to add support to the snapscan backend 
>> for the Benq Scanwit 2720S, a SCSI film scanner. This was greatly helped by 
>> also referring to the incomplete scanwit backend by Max Ushakov. Oliver has 
>> not responded to my emails for several weeks now. There was a problem early 
>> on when my email landed in his spam folder but he does not have much time 
>> spare at the moment anyway and his replies often took some time to come back 
>> so I am not sure if he is just busy or my emails are going astray.
>> I have a patch ready that I would like to be reviewed and then possibly 
>> committed. Is anyone in contact with Oliver? Is there someone else who can 
>> look at this patch?
>
>



[sane-devel] Support for Benq Scanwit 2720S

2013-02-25 Thread Paul Menzel
Dear Andrew, dear Oliver,


why not discuss this publicly on this list too.

1. People having a BenQ ScanWit 2720S might join the discussion and test
the patches too.

2. It is archived too in the case of some hardware failure and missing
backup.


Thanks,

Paul
-- next part --
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: 
<http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130225/02e48c6f/attachment.pgp>


[sane-devel] Support for Benq Scanwit 2720S

2013-02-25 Thread Oliver Schwartz
Andrew,

I'm sorry, but I haven't received any emails from you lately. The last message 
I got from you is from January 26th.

Can you please resent your emails, I'll double check for any over-eager spam 
filter.

Kind regards,

Oliver

> I was working with Oliver Schwartz to add support to the snapscan backend for 
> the Benq Scanwit 2720S, a SCSI film scanner. This was greatly helped by also 
> referring to the incomplete scanwit backend by Max Ushakov. Oliver has not 
> responded to my emails for several weeks now. There was a problem early on 
> when my email landed in his spam folder but he does not have much time spare 
> at the moment anyway and his replies often took some time to come back so I 
> am not sure if he is just busy or my emails are going astray.
> I have a patch ready that I would like to be reviewed and then possibly 
> committed. Is anyone in contact with Oliver? Is there someone else who can 
> look at this patch?