[sane-devel] scanbd problem with dbus permission ?
Am 20.08.2013 18:17, schrieb Michael Markusch: > Hi Wilhelm, > > thanks for your answer. > > I followed your notes but it still does not work. sad but true ;-) Looks like scanbd uses the wrong dll.conf, did you export SANE_CONFIG_DIR=/usr/local/etc/scanbd ? please show your configs: /etc/sane/dll.conf /usr/local/sbin/scanbd/dll.conf /usr/local/etc/scanbd/scanbd.conf and show the env-vars for the user starting the scanbd (root). > > - make distclean > - ./configure > - make > - set in /usr/local/sbin/scanbd/dll.confonly "genesys" > - sudo /usr/local/sbin/scanbd -d -f -c /usr/local/etc/scanbd/scanbd.conf > >> /usr/local/sbin/scanbd: debug on: level: 7 >> /usr/local/sbin/scanbd: dropping privs to uid saned >> /usr/local/sbin/scanbd: dropping privs to gid lp >> /usr/local/sbin/scanbd: drop privileges to gid: 7 >> /usr/local/sbin/scanbd: Running as effective gid 7 >> /usr/local/sbin/scanbd: drop privileges to uid: 112 >> /usr/local/sbin/scanbd: Running as effective uid 112 >> /usr/local/sbin/scanbd: dbus_init >> /usr/local/sbin/scanbd: dbus match >> type='signal',interface='org.freedesktop.Hal.Manager' >> /usr/local/sbin/scanbd: sane version 1.0 >> /usr/local/sbin/scanbd: Scanning for local-only devices >> /usr/local/sbin/scanbd: start_sane_threads >> /usr/local/sbin/scanbd: start dbus thread >> /usr/local/sbin/scanbd: udev init >> /usr/local/sbin/scanbd: get udev monitor >> /usr/local/sbin/scanbd: timeout: 500 ms >> /usr/local/sbin/scanbd: udev fd is non-blocking, now setting to >> blocking mode >> /usr/local/sbin/scanbd: Iteration on dbus call >> /usr/local/sbin/scanbd: start udev thread >> /usr/local/sbin/scanbd: udev thread started >> /usr/local/sbin/scanbd: Iteration on dbus call >> /usr/local/sbin/scanbd: Iteration on dbus call >> /usr/local/sbin/scanbd: Iteration on dbus call >> /usr/local/sbin/scanbd: Iteration on dbus call >> ... > > What else can I try? > > Thanks, > Michael > > > Am 20.08.2013 07:50, schrieb Wilhelm: >> Hi Michael, >> >> Am 18.08.2013 14:33, schrieb Michael Markusch: >>> Hi, >>> >>> I tried to install scanbd and I guess that's very easy, but now I have a >>> permission problem. In the past I use my scanner with sane as scanserver >>> and everything worked. >>> >>> My system: >>> Debian Wheezy, Kernel 3.6.11 on Raspberry Pi >>> >>> Scanner: >>> Canon canoscan lide 35 >>> >>> >>> Here my installation steps: >>> >>> - install libconfuse-dev libsane-dev libudev-dev libusb-dev >>> - I use scanbd from SVN >>> - ./configure --enable-scanbuttond (no problems) >> >> why did you enable scanbuttond-drivers. Your scanner should be fully >> supported by the sane-backends (and as you said, scanimage is working) >> >>> - make (no problems) >>> - make install (no problems) >>> - copy scanbd_dbus.conf to /etc/dbus-1/system.d/ >>> - install xinetd >>> - generate /etc/xinetd.d/sane-port >>> - edit /etc/sane.d/dll.conf set only "net" >>> - edit /usr/local/etc/scanbd/dll.conf set "#net" >> >> be sure to include the backend for your scanner >> >>> - edit /etc/sane.d/net.conf set localhost and connect_timeout = 60 >>> - copy backends /etc/sane.d/ to /usr/local/etc/scanbd/ >>> - export SANE_CONFIG_DIR=/usr/local/etc/scanbd >>> - /usr/local/sbin/scanbd -d -f -c /usr/local/etc/scanbd/scanbd.conf >>> (with problems) >>> >>> Log: >>> /usr/local/sbin/scanbd: debug on: level: 7 /usr/local/sbin/scanbd: dropping privs to uid saned /usr/local/sbin/scanbd: dropping privs to gid lp /usr/local/sbin/scanbd: drop privileges to gid: 7 /usr/local/sbin/scanbd: Can't set the effective gid to 7 /usr/local/sbin/scanbd: drop privileges to uid: 112 /usr/local/sbin/scanbd: Can't set the effective uid to 112 >> >> If you start scanbd as unprivileged user it isn't possible to changed >> the euid/egid. Start it as root and it will itself change the euid / >> egid to the ones in the config file. >> /usr/local/sbin/scanbd: dbus_init /usr/local/sbin/scanbd: dbus match type='signal',interface='org.freedesktop.Hal.Manager' /usr/local/sbin/scanbd: Loading /usr/local/lib/scanbd/scanbuttond/backends/meta.so /usr/local/sbin/scanbd: meta-backend: init /usr/local/sbin/scanbd: libusbi: initializing... /usr/local/sbin/scanbd: Loading /usr/local/lib/scanbd/scanbuttond/backends/hp3500.so /usr/local/sbin/scanbd: meta-backend: attaching backend: HP3500 USB /usr/local/sbin/scanbd: hp3500-backend: init /usr/local/sbin/scanbd: Loading /usr/local/lib/scanbd/scanbuttond/backends/snapscan.so /usr/local/sbin/scanbd: meta-backend: attaching backend: Snapscan USB /usr/local/sbin/scanbd: snapscan-backend: init /usr/local/sbin/scanbd: Loading /usr/local/lib/scanbd/scanbuttond/backends/niash.so /usr/local/sbin/scanbd: meta-backend: attaching backend: Niash USB /usr/local/sbin/scanbd: niash-backend: init /usr/local/sbin/scanbd: Loading /usr/local/lib/scanbd/scanbuttond/backends/epson_vphoto.so /usr/local/sbin/scan
[sane-devel] [sane-pixma] Canon MF4150 v. PIXMA_CAP_LINEART
On Tue, 20 Aug 2013 09:36:18 -0400, Samuel Adam wrote: > I know experientially that the Canon imageCLASS MF4150 is possessed > of a 1-bpp lineart mode. Pages fly through the automatic feeder, and [...] > sane-pixma permits only --mode Color or --mode Gray with the MF4150, > and `scanimage -A` shows only these options. I dislike replying to my own message; but I seem to have omitted the most important info. Duh: $ scanimage -V scanimage (sane-backends) 1.0.23; backend version 1.0.23 I have tried cranking up SANE_DEBUG_PIXMA in my environment. Confirmed that what kills it is setting --mode to anything explicit other than "Color" or "Gray" (as `scanimage -A` indeed promised, and the sources seem to indicate). Everything else seems to work. The problem surface is quite narrow. Samuel Adam
[sane-devel] scanbd problem with dbus permission ?
Hi Wilhelm, thanks for your answer. I followed your notes but it still does not work. - make distclean - ./configure - make - set in /usr/local/sbin/scanbd/dll.confonly "genesys" - sudo /usr/local/sbin/scanbd -d -f -c /usr/local/etc/scanbd/scanbd.conf > /usr/local/sbin/scanbd: debug on: level: 7 > /usr/local/sbin/scanbd: dropping privs to uid saned > /usr/local/sbin/scanbd: dropping privs to gid lp > /usr/local/sbin/scanbd: drop privileges to gid: 7 > /usr/local/sbin/scanbd: Running as effective gid 7 > /usr/local/sbin/scanbd: drop privileges to uid: 112 > /usr/local/sbin/scanbd: Running as effective uid 112 > /usr/local/sbin/scanbd: dbus_init > /usr/local/sbin/scanbd: dbus match > type='signal',interface='org.freedesktop.Hal.Manager' > /usr/local/sbin/scanbd: sane version 1.0 > /usr/local/sbin/scanbd: Scanning for local-only devices > /usr/local/sbin/scanbd: start_sane_threads > /usr/local/sbin/scanbd: start dbus thread > /usr/local/sbin/scanbd: udev init > /usr/local/sbin/scanbd: get udev monitor > /usr/local/sbin/scanbd: timeout: 500 ms > /usr/local/sbin/scanbd: udev fd is non-blocking, now setting to > blocking mode > /usr/local/sbin/scanbd: Iteration on dbus call > /usr/local/sbin/scanbd: start udev thread > /usr/local/sbin/scanbd: udev thread started > /usr/local/sbin/scanbd: Iteration on dbus call > /usr/local/sbin/scanbd: Iteration on dbus call > /usr/local/sbin/scanbd: Iteration on dbus call > /usr/local/sbin/scanbd: Iteration on dbus call > ... What else can I try? Thanks, Michael Am 20.08.2013 07:50, schrieb Wilhelm: > Hi Michael, > > Am 18.08.2013 14:33, schrieb Michael Markusch: >> Hi, >> >> I tried to install scanbd and I guess that's very easy, but now I have a >> permission problem. In the past I use my scanner with sane as scanserver >> and everything worked. >> >> My system: >> Debian Wheezy, Kernel 3.6.11 on Raspberry Pi >> >> Scanner: >> Canon canoscan lide 35 >> >> >> Here my installation steps: >> >> - install libconfuse-dev libsane-dev libudev-dev libusb-dev >> - I use scanbd from SVN >> - ./configure --enable-scanbuttond (no problems) > > why did you enable scanbuttond-drivers. Your scanner should be fully > supported by the sane-backends (and as you said, scanimage is working) > >> - make (no problems) >> - make install (no problems) >> - copy scanbd_dbus.conf to /etc/dbus-1/system.d/ >> - install xinetd >> - generate /etc/xinetd.d/sane-port >> - edit /etc/sane.d/dll.conf set only "net" >> - edit /usr/local/etc/scanbd/dll.conf set "#net" > > be sure to include the backend for your scanner > >> - edit /etc/sane.d/net.conf set localhost and connect_timeout = 60 >> - copy backends /etc/sane.d/ to /usr/local/etc/scanbd/ >> - export SANE_CONFIG_DIR=/usr/local/etc/scanbd >> - /usr/local/sbin/scanbd -d -f -c /usr/local/etc/scanbd/scanbd.conf >> (with problems) >> >> Log: >> >>> /usr/local/sbin/scanbd: debug on: level: 7 >>> /usr/local/sbin/scanbd: dropping privs to uid saned >>> /usr/local/sbin/scanbd: dropping privs to gid lp >>> /usr/local/sbin/scanbd: drop privileges to gid: 7 >>> /usr/local/sbin/scanbd: Can't set the effective gid to 7 >>> /usr/local/sbin/scanbd: drop privileges to uid: 112 >>> /usr/local/sbin/scanbd: Can't set the effective uid to 112 > > If you start scanbd as unprivileged user it isn't possible to changed > the euid/egid. Start it as root and it will itself change the euid / > egid to the ones in the config file. > >>> /usr/local/sbin/scanbd: dbus_init >>> /usr/local/sbin/scanbd: dbus match >>> type='signal',interface='org.freedesktop.Hal.Manager' >>> /usr/local/sbin/scanbd: Loading >>> /usr/local/lib/scanbd/scanbuttond/backends/meta.so >>> /usr/local/sbin/scanbd: meta-backend: init >>> /usr/local/sbin/scanbd: libusbi: initializing... >>> /usr/local/sbin/scanbd: Loading >>> /usr/local/lib/scanbd/scanbuttond/backends/hp3500.so >>> /usr/local/sbin/scanbd: meta-backend: attaching backend: HP3500 USB >>> /usr/local/sbin/scanbd: hp3500-backend: init >>> /usr/local/sbin/scanbd: Loading >>> /usr/local/lib/scanbd/scanbuttond/backends/snapscan.so >>> /usr/local/sbin/scanbd: meta-backend: attaching backend: Snapscan USB >>> /usr/local/sbin/scanbd: snapscan-backend: init >>> /usr/local/sbin/scanbd: Loading >>> /usr/local/lib/scanbd/scanbuttond/backends/niash.so >>> /usr/local/sbin/scanbd: meta-backend: attaching backend: Niash USB >>> /usr/local/sbin/scanbd: niash-backend: init >>> /usr/local/sbin/scanbd: Loading >>> /usr/local/lib/scanbd/scanbuttond/backends/epson_vphoto.so >>> /usr/local/sbin/scanbd: meta-backend: attaching backend: Epson VX00 >>> Photo USB >>> /usr/local/sbin/scanbd: epson-vphoto-backend: init >>> /usr/local/sbin/scanbd: Scanning for local-only devices >>> /usr/local/sbin/scanbd: Can't get the scbtn device list > > your scanner isn't recognized by the old scanbuttond-backends. As said > above please use the sane-backends > >>> /usr/local/sbin/scanbd: device list null >>> /usr/local/sbin/scanbd: start_scbtn_threads >>> /usr/local/sbin/scanbd: start
[sane-devel] [sane-pixma] Canon MF4150 v. PIXMA_CAP_LINEART
I know experientially that the Canon imageCLASS MF4150 is possessed of a 1-bpp lineart mode. Pages fly through the automatic feeder, and text is accorded an OCR-friendly crispiness lacking in the greyscale mode. The Canon-provided Windows-only software provides two modes it respectively terms "Black and White" (not too good) and "Black and White Text" (much better).[1] I do not currently have a Windows machine available, and I need to make some scans *yesterday*. sane-pixma permits only --mode Color or --mode Gray with the MF4150, and `scanimage -A` shows only these options. What would happen if I simply ORed in PIXMA_CAP_LINEART at the appropriate line in pixma_imageclass.c? - DEV ("Canon imageCLASS MF4150", "MF4100", MF4100_PID, 600, 640, 877, PIXMA_CAP_ADF), + DEV ("Canon imageCLASS MF4150", "MF4100", MF4100_PID, 600, 640, 877, PIXMA_CAP_ADF | PIXMA_CAP_LINEART), I expect this would lead to Bad Things, what with all the moving parts I skimmed past. But is any other way to make it work right quickly? Sorry to return ENOTIME on the project to actually familiarize myself with sane-pixma code, beyond a simple grep. And thanks to the folks who reverse-engineered the Canon protocols, so I can use scanner at all. Samuel Adam [1] The idiot-friendly software has a checkbox captioned "Show Scanner Driver". Check it, and options galore do arise.
[sane-devel] scanbd problem with dbus permission ?
Hi Michael, Am 18.08.2013 14:33, schrieb Michael Markusch: > Hi, > > I tried to install scanbd and I guess that's very easy, but now I have a > permission problem. In the past I use my scanner with sane as scanserver > and everything worked. > > My system: > Debian Wheezy, Kernel 3.6.11 on Raspberry Pi > > Scanner: > Canon canoscan lide 35 > > > Here my installation steps: > > - install libconfuse-dev libsane-dev libudev-dev libusb-dev > - I use scanbd from SVN > - ./configure --enable-scanbuttond (no problems) why did you enable scanbuttond-drivers. Your scanner should be fully supported by the sane-backends (and as you said, scanimage is working) > - make (no problems) > - make install (no problems) > - copy scanbd_dbus.conf to /etc/dbus-1/system.d/ > - install xinetd > - generate /etc/xinetd.d/sane-port > - edit /etc/sane.d/dll.conf set only "net" > - edit /usr/local/etc/scanbd/dll.conf set "#net" be sure to include the backend for your scanner > - edit /etc/sane.d/net.conf set localhost and connect_timeout = 60 > - copy backends /etc/sane.d/ to /usr/local/etc/scanbd/ > - export SANE_CONFIG_DIR=/usr/local/etc/scanbd > - /usr/local/sbin/scanbd -d -f -c /usr/local/etc/scanbd/scanbd.conf > (with problems) > > Log: > >> /usr/local/sbin/scanbd: debug on: level: 7 >> /usr/local/sbin/scanbd: dropping privs to uid saned >> /usr/local/sbin/scanbd: dropping privs to gid lp >> /usr/local/sbin/scanbd: drop privileges to gid: 7 >> /usr/local/sbin/scanbd: Can't set the effective gid to 7 >> /usr/local/sbin/scanbd: drop privileges to uid: 112 >> /usr/local/sbin/scanbd: Can't set the effective uid to 112 If you start scanbd as unprivileged user it isn't possible to changed the euid/egid. Start it as root and it will itself change the euid / egid to the ones in the config file. >> /usr/local/sbin/scanbd: dbus_init >> /usr/local/sbin/scanbd: dbus match >> type='signal',interface='org.freedesktop.Hal.Manager' >> /usr/local/sbin/scanbd: Loading >> /usr/local/lib/scanbd/scanbuttond/backends/meta.so >> /usr/local/sbin/scanbd: meta-backend: init >> /usr/local/sbin/scanbd: libusbi: initializing... >> /usr/local/sbin/scanbd: Loading >> /usr/local/lib/scanbd/scanbuttond/backends/hp3500.so >> /usr/local/sbin/scanbd: meta-backend: attaching backend: HP3500 USB >> /usr/local/sbin/scanbd: hp3500-backend: init >> /usr/local/sbin/scanbd: Loading >> /usr/local/lib/scanbd/scanbuttond/backends/snapscan.so >> /usr/local/sbin/scanbd: meta-backend: attaching backend: Snapscan USB >> /usr/local/sbin/scanbd: snapscan-backend: init >> /usr/local/sbin/scanbd: Loading >> /usr/local/lib/scanbd/scanbuttond/backends/niash.so >> /usr/local/sbin/scanbd: meta-backend: attaching backend: Niash USB >> /usr/local/sbin/scanbd: niash-backend: init >> /usr/local/sbin/scanbd: Loading >> /usr/local/lib/scanbd/scanbuttond/backends/epson_vphoto.so >> /usr/local/sbin/scanbd: meta-backend: attaching backend: Epson VX00 >> Photo USB >> /usr/local/sbin/scanbd: epson-vphoto-backend: init >> /usr/local/sbin/scanbd: Scanning for local-only devices >> /usr/local/sbin/scanbd: Can't get the scbtn device list your scanner isn't recognized by the old scanbuttond-backends. As said above please use the sane-backends >> /usr/local/sbin/scanbd: device list null >> /usr/local/sbin/scanbd: start_scbtn_threads >> /usr/local/sbin/scanbd: start the threads (0) >> /usr/local/sbin/scanbd: start dbus thread >> /usr/local/sbin/scanbd: Not Primary Owner (-1) >> /usr/local/sbin/scanbd: Name Error (Connection ":1.48" is not allowed >> to own the service "de.kmux.scanbd.server" due to security policies in >> the configuration file) > > If I started scanbd as "sudo": > > Log: > >> ... >> /usr/local/sbin/scanbd: meta-backend: attaching backend: Epson VX00 >> Photo USB >> /usr/local/sbin/scanbd: epson-vphoto-backend: init >> /usr/local/sbin/scanbd: Scanning for local-only devices >> /usr/local/sbin/scanbd: Can't get the scbtn device list >> /usr/local/sbin/scanbd: device list null >> /usr/local/sbin/scanbd: start_scbtn_threads >> /usr/local/sbin/scanbd: start the threads (0) >> /usr/local/sbin/scanbd: start dbus thread >> /usr/local/sbin/scanbd: timeout: 500 ms >> /usr/local/sbin/scanbd: Iteration on dbus call >> /usr/local/sbin/scanbd: Iteration on dbus call >> /usr/local/sbin/scanbd: Iteration on dbus call >> /usr/local/sbin/scanbd: Iteration on dbus call >> /usr/local/sbin/scanbd: Iteration on dbus call >> /usr/local/sbin/scanbd: Iteration on dbus call > > I tried also too: > > - SANE_CONFIG_DIR=/usr/local/etc/scanbd scanimage -L (with problems) > - copy 99-saned.rules to /lib/udev/rules.d > - udevadm trigger > - SANE_CONFIG_DIR=/usr/local/etc/scanbd scanimage -L (with problems) > - sudo SANE_CONFIG_DIR=/usr/local/etc/scanbd scanimage -L (no problems) > > > I'm not familiar with dbus and so on... Can someone help me please? Please do: make distclean ./configure make and install it as above. Then redo your tests. -- Wilhelm w.meier at unix.net