Bug 234954
Summary: | [RFE] Make scanbuttond a little easier to config | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Chris Bagwell <chris> | ||||
Component: | scanbuttond | Assignee: | Parag AN(पराग) <panemade> | ||||
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | rawhide | Keywords: | FutureFeature | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Enhancement | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2010-01-28 06:12:40 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Chris Bagwell
2007-04-03 03:21:47 UTC
Created attachment 151503 [details]
updated buttonpressed.sh
Chris, 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 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. (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" OK > > 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 buttonpressed.rpmnew. Either way would preserve users changes so they could copy them over to the new file. 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 executable-marked-as-config-file 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: EDITBUTTON=1 PRINTBUTTON=2 EMAILBUTTON=3 CUSTOMBUTTON=4 # 8.5 x 11 SCANIMAGE_PAGESIZE="-x 215 -y 279" # A4 #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: EDIT_MODE=Color EDIT_RESOLUTION=300 ect,etc and then in buttonpressed.sh change to: if [ "$1"x = "$EDITBUTTON"x ] ; then MODE=$EDIT_MODE RESOLUTION=$EDIT_RESOLUTION etc,etc 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. |