From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:22.214.171.124) Gecko/20070313 Fedora/126.96.36.199-5.fc6 Firefox/188.8.131.52
Description of problem:
The upstream scanbuttond does not come with any default behavior when buttons are pressed. So the Fedora mantainer was good enough to include a script to have some basic scanning behavior.
I made some additions to the script so that users can customize the behavior without understanding command line args for programs used. Its closer to being able to set options via a /etc/sysconfig file.
1) Probably the biggest improvement will be the "-o fitplot" option to lpr to make printouts actually scale (down) to fit the page.
2) it increases/decreases the scan resolution based on what your attempting... A copy operation only needs to be 150 to match xerox quality... Easy flag to change to black&white to make it even faster. The user probably wants full resolution for EDIT operation and so it increases for that.
3) User can change what buttons map to copy/print/email in a more obvious way if their scanner's button labels don't match script.
4) Quick change variable to switch to A4 paper size scans if your not a US person.
5) Uses ImageMagick to convert the image to JPG before emailing... No one is really going to like sending PNM files in emails. Probably should make that conversion optional though.
6) Added support for Thunderbird in theory... Current Fedora Core 6 Thundbird has a bug related to -compose flag. Evolution is giving me problems as well because it never "exits".
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Try to configure
Created attachment 151503 [details]
thanks for your Feature Request Bug. I had already seen your mail But did not
get time to reply it and work on it. I was about to ask you to file bug and you
already did that :)
Will take a look into it and reply here.
Thanks for your work.
Package Built scanbuttond-0.2.3-10.fc7
Test Package and reply back In case you still have any problems with
buttonpressed.sh script so that I can build same for FC6 also :)
May I know on which scanners you are testing this package?
Checked a little earlier today and the new RPM wasn't available... Probaby takes
a day to make it in FTP site?
Anyways, I will answer now that I tested only with 1 scanner. Its a Canon
CanoScan LiDE 25" which isn't listed as supported but does indeed work. Output
Mar 31 12:50:54 brew4me scanbuttond: found scanner: vendor="Canon", product="Can
oScan LiDE 25", connection="libusb", sane_name="plustek:libusb:002:004"
I specifically commented in the script about lack of locking because this may or
maynot be backend specific. Plustek backend seems to only process 1 keypress
until script completion.
I think we are safe by using libusb itself for the lock while SANE is running
but maybe we should be concerned with GIMP editing an image and user printing at
the same time (again, not a problem with my backend).
If it is an issue then this could be resolved without locking by making the
TMPFILE="/tmp/scan$$.pnm" so that different operations could occur at the same
time. Probably TMPFILE="/tmp/scan$1.pnm" wouldn't use up so much disk space on
I'll post results of RPM install when I get it.
(In reply to comment #4)
> Checked a little earlier today and the new RPM wasn't available... Probaby takes
> a day to make it in FTP site?
Ohh. Looks I requested very early to you for testing a new RPM.
> Anyways, I will answer now that I tested only with 1 scanner. Its a Canon
> CanoScan LiDE 25" which isn't listed as supported but does indeed work. Output
> from scanbuttond:
> Mar 31 12:50:54 brew4me scanbuttond: found scanner: vendor="Canon", product="Can
> oScan LiDE 25", connection="libusb", sane_name="plustek:libusb:002:004"
> I specifically commented in the script about lack of locking because this may or
> maynot be backend specific. Plustek backend seems to only process 1 keypress
> until script completion.
> I think we are safe by using libusb itself for the lock while SANE is running
> but maybe we should be concerned with GIMP editing an image and user printing at
> the same time (again, not a problem with my backend).
> If it is an issue then this could be resolved without locking by making the
> TMPFILE="/tmp/scan$$.pnm" so that different operations could occur at the same
> time. Probably TMPFILE="/tmp/scan$1.pnm" wouldn't use up so much disk space on
> shell crashes.
> I'll post results of RPM install when I get it.
Thanks for your reply. Remember I have built for devel(FC7) branch only and not
yet for FC6.
I upgraded my FC6 box with the devel RPM and all worked fine.
On suggestion though... I don't know how to do this myself as I've never messed
with spec files.
The buttonpressed.sh has a high chance of being modified by endusers since its
basically a configuration file. Some of the other RPM packages will detect
configuration file changes and do one of two things... 1) Rename the old version
to buttonpressed.rpmold or 2) leave the old version and create the new one as
Either way would preserve users changes so they could copy them over to the new
sorry for being late for reply.
will do it early.
ok I did that locally and found that rpmlint reported Error on binary RPM with error
I guess we should probably do this the right way then. We can create a real
config file called /etc/sysconfig/scanbuttond and put things like:
# 8.5 x 11
SCANIMAGE_PAGESIZE="-x 215 -y 279"
#SCANIMAGE_PAGESIZE="-x 210 -y 297"
Then at the top of /etc/scanbuttond/buttonpressed.sh, we can add "source
/etc/sysconfig/scanbuttond" and remove all those variables from the script.
Probably the MODE and RESOLUTION settings need to be reworked for this.
Something like in the sysconfig file:
and then in buttonpressed.sh change to:
if [ "$1"x = "$EDITBUTTON"x ] ; then
If I have some free time I'll attach a patch for this. May be a while though.
Adding FutureFeature keyword to RFE's.
Retired this package from Fedora rawhide/13 now. Sorry to say but I have no time to test changes needed here.