<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2013/8/21 Wilhelm <span dir="ltr"><<a href="mailto:wilhelm.meier@fh-kl.de" target="_blank">wilhelm.meier@fh-kl.de</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi Sander,<br>
<br>
Am 21.08.2013 00:40, schrieb Sander Devrieze:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hello,<br>
<br>
I am trying to convert a WD MyBook into a scanner server. Sane detects<br>
the scanner and I was able to scan, but I cannot get scanbd to work.<br>
</blockquote>
<br></div>
Which options did you use for configure?</blockquote><div><br></div><div>None, I just did a plain "./configure".<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im">
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
May this be related to the fact that I am using a *very* old udev<br>
version (0.125-7+lenny3) which cannot be upgraded?<br>
</blockquote>
<br></div>
On Lenny you should try usind hal instead of udev. But this is only resonsible for detecting removable devices. As a fallback scanbd can be signaled (using some udev-rule, e.g.), please check the docu.<br><div class="im">
</div></blockquote><div><br></div><div>I am running Debian Squeeze. Only the udev package is from Lenny. This is needed because otherwise the special "MyBook Linux kernel" will not boot.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im">
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Check the debug<br>
output below. How can I get scanbd running on my system?<br>
</blockquote>
<br></div>
First of all scanbd doesn't detect any scanner. There may be various reasons. But most likely scanbd uses a wrong dll.conf.<br>
<br>
Did you<br>
export SANE_CONFIG_DIR=/usr/local/etc/scanbd ?<br></blockquote><div><br>Yes, and I also run scanbd like this to be sure:<br>/usr/local/sbin/scanbd -d7 -f -c /usr/local/etc/scanbd/scanbd.conf<br> <br></div><div>When running scanbm, one of the lines reads like this:<br>
<br>scanbm: Setting environment: SANE_CONFIG_DIR=/usr/local/etc/scanbd/sane.d<br><br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
please show your configs:<br>
<br>
/etc/sane/dll.conf<br></blockquote><div><br># /etc/sane.d/dll.conf - Configuration file for the SANE dynamic backend loader<br>#<br># Backends can also be enabled by configuration snippets under<br># /etc/sane.d/dll.d directory -- packages providing backends should drop<br>
# a config file similar to dll.conf in this directory, named after the package.<br>#<br><br># The next line enables the network backend; comment it out if you don't need<br># to use a remote SANE scanner over the network - see sane-net(5) and saned(8)<br>
net<br>#abaton<br>#agfafocus<br>#apple<br></div><div><snip all lines commented out below this><br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

/usr/local/sbin/scanbd/dll.<u></u>conf<br></blockquote><div><br></div><div>Ok, that seems to help. Maybe the readme file should be more clear that you need to copy the config files and not the directory "sane.d" in here. scanbd seems to work. However, sane does not recognize the scanner:<br>
<br>scanimage: no SANE devices found<br><br></div><div>Any idea what can be wrong?<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

/usr/local/etc/scanbd/scanbd.<u></u>conf<br>
<br></blockquote><div><br># global settings<br>global {<br>        # turn on debugging<br><br>        # log to console<br>        debug   = true<br><br>        # debug logging<br>        # 1=error, 2=warn, 3=info, 4-7=debug<br>
        debug-level = 7<br><br>        # drop priviliges to this user<br>        #=============================<br>        # Linux:<br>        # user    = saned # root<br>        # *BSD<br>        # user    = root<br>        user    = saned<br>
<br>        # Group to be used<br>        #=================<br>        # Linux (most distributions use the lp group to access scanners)<br>        # group   = lp<br>        # ArchLinux (ArchLinux uses the scanner group)<br>
        # group = scanner<br>        #<br>        # *BSD (no group lp here, use daemon instead)<br>        # group   = daemon # root<br>        #<br>        group   = saned<br>        # the saned executable for manager-mode<br>
        saned   = "/usr/sbin/saned"<br>        saned_opt  = {} # string-list<br>        saned_env  = { "SANE_CONFIG_DIR=/usr/local/etc/scanbd" } # list of environment vars for saned<br><br>        # Scriptdir specifies where scanbs normally looks for scripts.<br>
        # The scriptdir option can be defined as:<br>        #   - a path relative to the configuations (<path>/etc/scanbd) directory<br>        #   - an abosolute path<br>        # Examples:<br>        # scriptdir = scripts<br>
        # sets scriptdir to <path>/etc/scripts.<br>        # scriptdir = /some/path<br>        # sets scriptdir to the specified absolute path<br>        # Default scriptdir is <path>/etc/scanbd, this is normally appropriate<br>
        # scriptdir =<br><br>        # scanbuttond_backends_dir sets the path where scanbd looks for the scanbuttond backends<br>        # It can be defined as relative path, starting from the scanbd config directory or<br>
        # as an absolute path<br>        # Default is <libdir>/scanbd/scanbutond/backends<br>        # Example<br>        # scanbuttond_backends_dir = "/usr/local/lib/scanbd/scanbuttond/backends"<br><br>        # poll timeout in [ms]<br>
        # (for polling the devices)<br>        timeout = 500<br><br>        pidfile = "/var/run/scanbd.pid"<br><br>        # env-vars for the scripts<br>        environment {<br>                # pass the device label as below in this env-var<br>
                device = "SCANBD_DEVICE"<br>                # pass the action label as below in this env-var<br>                action = "SCANBD_ACTION"<br>        }<br><br>        # function definitions<br>
        # values of the options are simply passed via env-vars<br><br>        function function_knob {<br>                filter = "^message.*"<br>                desc   = "The value of the function knob / wheel / selector"<br>
                env    = "SCANBD_FUNCTION"<br>        }<br>        function function_mode {<br>                filter = "^mode.*"<br>                desc   = "Color mode"<br>                env    = "SCANBD_FUNCTION_MODE"<br>
        }<br><br>        multiple_actions = true # allow multiple actions per option (up to the total amount of options)<br>        # action definitions<br>        # if the filter matches and the value changes<br>        # from from-value to to-value,<br>
        # <script> is executed<br>        # <script> is the full pathname (do not include any parameters)<br>        # if parameters are needed, write a script<br><br>        # since we can have only a most one action for each option, the action-script<br>
        # can use the function definition (see above) to distinguish different tasks<br>        # (e.g. use the env-var SCANBD_FUNCTION defined above)<br><br>        action scan {<br>                filter = "^scan.*"<br>
                numerical-trigger {<br>                        from-value = 1<br>                        to-value   = 0<br>                }<br>                desc   = "Scan to file"<br>                # script must be an relative path starting from scriptdir (see above),<br>
                # or an absolute pathname.<br>                # It must contain the path to the action script without arguments<br>                # Absolute path example: script = "/some/path/foo.script<br>                script = "test.script"<br>
        }<br>        action email {<br>                filter = "^email$"<br>               string-trigger {<br>                        from-value  = ""<br>                        to-value    = "^email.*"<br>
                }<br>                desc   = "Scan to email"<br>                # script must be an relative path starting from scriptdir (see above),<br>                # or an absolute pathname.<br>                # It must contain the path to the action script without arguments<br>
                # Absolute path example: script = "/some/path/foo.script<br>                script = "test.script"<br>        }<br>        action copy {<br>                filter = "^copy$"<br>                string-trigger {<br>
                        from-value  = ""<br>                        to-value    = "^copy.*"<br>                }<br>                desc   = "Copy to printer"<br>                # script must be an relative path starting from scriptdir (see above),<br>
                # or an absolute pathname.<br>                # It must contain the path to the action script without arguments<br>                # Absolute path example: script = "/some/path/foo.script<br>                script = "test.script"<br>
        }<br>        action preview {<br>                filter = "^preview$"<br>                numerical-trigger {<br>                        from-value = 1<br>                        to-value   = 0<br>                }<br>
                desc   = "Preview"<br>                # script must be an relative path starting from scriptdir (see above),<br>                # or an absolute pathname.<br>                # It must contain the path to the action script without arguments<br>
                # Absolute path example: script = "/some/path/foo.script<br>                script = "test.script"<br>        }<br>        action globaltest {<br>                filter = "^message.*"<br>
                desc   = "Test (print all env vars)"<br>                # script must be an relative path starting from scriptdir (see above),<br>                # or an absolute pathname.<br>                # It must contain the path to the action script without arguments<br>
                # Absolute path example: script = "/some/path/foo.script<br>                script = "test.script"<br>        }<br>}<br><br># include<br># include another file at this point. This may only occur outside general and devices blocks<br>
# an include statement may be relative (to the direcory where scanbd.conf is located or aboslute<br># include("scanner.d/myscanner.conf")<br># include("/my/long/path/myscanner.conf")<br><br># devices<br>
# each device can have actions and functions, you can disable not relevant devices<br>include(scanner.d/avision.conf)<br>include(scanner.d/fujitsu.conf)<br>include(scanner.d/hp.conf)<br>include(scanner.d/pixma.conf)<br>include(scanner.d/snapscan.conf)<br>
include(scanner.d/canon.conf)<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
and show the env-vars for the user starting the scanbd (root).<div class=""><div class="h5"><br></div></div></blockquote><div><br>TERM=xterm<br>SHELL=/bin/bash<br>OLDPWD=/root<br>SSH_TTY=/dev/pts/0<br>USER=root<br>MAIL=/var/mail/root<br>
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin<br>PWD=/usr/local/etc/scanbd<br>LANG=en_US.UTF-8<br>SHLVL=1<br>HOME=/root<br>LOGNAME=root<br>SANE_CONFIG_DIR=/usr/local/etc/scanbd<br>_=/usr/bin/env</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class=""><div class="h5">
<br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Thanks for helping me out!<br>
<br>
/usr/local/sbin/scanbd: foreground<br>
/usr/local/sbin/scanbd: config-file: /usr/local/etc/scanbd/scanbd.<u></u>conf<br>
/usr/local/sbin/scanbd: reading config file<br>
/usr/local/etc/scanbd/scanbd.<u></u>conf<br>
/usr/local/sbin/scanbd: debug on: level: 7<br>
/usr/local/sbin/scanbd: dropping privs to uid saned<br>
/usr/local/sbin/scanbd: dropping privs to gid saned<br>
/usr/local/sbin/scanbd: drop privileges to gid: 109<br>
/usr/local/sbin/scanbd: Running as effective gid 109<br>
/usr/local/sbin/scanbd: drop privileges to uid: 104<br>
/usr/local/sbin/scanbd: Running as effective uid 104<br>
/usr/local/sbin/scanbd: dbus_init<br>
/usr/local/sbin/scanbd: dbus match<br>
type='signal',interface='org.<u></u>freedesktop.Hal.Manager'<br>
/usr/local/sbin/scanbd: sane version 1.0<br>
/usr/local/sbin/scanbd: Scanning for local-only devices<br>
/usr/local/sbin/scanbd: start_sane_threads<br>
/usr/local/sbin/scanbd: start dbus thread<br>
/usr/local/sbin/scanbd: timeout: 500 ms<br>
/usr/local/sbin/scanbd: Iteration on dbus call<br>
/usr/local/sbin/scanbd: udev init<br>
/usr/local/sbin/scanbd: get udev monitor<br>
libudev: udev_monitor_enable_receiving: bind failed: Operation not permitted<br>
/usr/local/sbin/scanbd: Can't enable udev receiving<br>
/usr/local/sbin/scanbd: Can't init udev<br>
/usr/local/sbin/scanbd: Iteration on dbus call<br>
/usr/local/sbin/scanbd: Iteration on dbus call<br>
/usr/local/sbin/scanbd: Iteration on dbus call<br>
<br>
--<br>
Kind Regards,<br>
Sander Devrieze<br>
<br>
<br>
</blockquote>
<br>
<br></div></div><span class=""><font color="#888888">
-- <br>
Wilhelm<br>
<a href="mailto:w.meier@unix.net" target="_blank">w.meier@unix.net</a><br>
</font></span></blockquote></div><br></div></div>