Default scanbd install references missing scripts

Bug #1666659 reported by Dylan Justice
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
scanbd (Ubuntu)
Triaged
Medium
Rolf Leggewie

Bug Description

The default install references a missing script (and directory) at /etc/scanbd/scripts/test.script. The install detected my scanner and logged a button action (yay!), but reported the following cryptic errors on syslog. This would be impossible for a newbie to figure out.

 scanbd: trigger action for scan for device fujitsu:ScanSnap S510M:503191 with script test.script
 scanbd: access: No such file or directory
 scanbd: stat: No such file or directory
 scanbd: execlp: No such file or directory
 scanbd: dbus match type='signal',interface='org.freedesktop.Hal.Manager'
 scanbd: Not Primary Owner (2)
 scanbd: trigger action for page-loaded for device fujitsu:ScanSnap S510M:503191 with script (null)
 scanbd: trigger action for scan for device fujitsu:ScanSnap S510M:503191 with script test.script
 scanbd: access: No such file or directory
 scanbd: stat: No such file or directory
 scanbd: execlp: No such file or directory

I'd suggest including a scripts/test.script with the following content:

 #!/bin/bash
 # Replace this placeholder script with something like
 # https://pypi.python.org/pypi/scanpdf

 logger -t "scanbd: $0" "Begin of $SCANBD_ACTION for device $SCANBD_DEVICE"

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: scanbd 1.4.4-1build1
ProcVersionSignature: Ubuntu 4.8.0-22.24-generic 4.8.0
Uname: Linux 4.8.0-22-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.3-0ubuntu8
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Feb 21 11:51:44 2017
InstallationDate: Installed on 2015-12-13 (436 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
SourcePackage: scanbd
UpgradeStatus: Upgraded to yakkety on 2017-01-09 (43 days ago)

Revision history for this message
Dylan Justice (dsjstc) wrote :
Rolf Leggewie (r0lf)
Changed in scanbd (Ubuntu):
assignee: nobody → Rolf Leggewie (r0lf)
importance: Undecided → Medium
Rolf Leggewie (r0lf)
Changed in scanbd (Ubuntu):
status: New → Triaged
Revision history for this message
Michael Nahas (mdnahas) wrote :

This bug could be fixed by documentation --- there is no documentation with the package about the scripts!

To get this working, I had to understand scanbd.conf, which is in directory with 72 other .conf files. It took an hour to just understand what I was supposed to do.

I like Dylan's default script. I would also add to the log "This script is located at /etc/scanbd/scripts/test.script if you want to edit it."

For other users' information, this was the script I ended up using:

#! /bin/sh

echo >> /tmp/scanbd_tests.txt
echo Starting. >> /tmp/scanbd_tests.txt

echo Running as `whoami` >> /tmp/scanbd_tests.txt

DATETIME=`date +"%FT%T.%N"`
echo Datetime is $DATETIME >> /tmp/scanbd_tests.txt

DIR=`mktemp -d`
cd $DIR
echo made and moved to $DIR >> /tmp/scanbd_tests.txt

echo scanning >> /tmp/scanbd_tests.txt
#scanimage -L # tells you what devices are on the system.
scanimage -b --format png -d 'fujitsu:ScanSnap S1500:5856' --source 'ADF Front' --resolution 150

# WARN: PDF generation was disabled by default.
# Re-enable it by editing /etc/ImageMagick-6/policy.xml
echo converting *.png >> /tmp/scanbd_tests.txt
convert *.png scan.pdf

echo OCR-ing >> /tmp/scanbd_tests.txt
ocrmypdf scan.pdf scan_ocr.pdf

DIRNAME=/home/mike/Desktop/Home/life/scanned_documents/
FILENAME="scan_${DATETIME}.pdf"

echo moving to "$DIRNAME$FILENAME" >> /tmp/scanbd_tests.txt
mv scan_ocr.pdf "$DIRNAME$FILENAME"

echo changing owner of "$DIRNAME$FILENAME" >> /tmp/scanbd_tests.txt
chown mike:mike "$DIRNAME$FILENAME"

echo Done. >> /tmp/scanbd_tests.txt

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.