Linux Scanner Server testing

Khelmar
Posts: 21
Joined: Sat Aug 29, 2009 9:41 am

Linux Scanner Server testing

Postby Khelmar » Sat Aug 29, 2009 11:10 am

I just got done packaging this app, and wondered if anyone wants to be the second alpha tester.

Linux Scanner Server (http://scannerserver.online02.com/) is a web-based interface to SANE, letting people on a network with a Javascript-capable browser scan and download images and text. It supports Tesseract for OCR.

If anyone's interested, let me know and I'll add you as a collaborator.

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: Linux Scanner Server testing

Postby cpg » Sat Aug 29, 2009 1:31 pm

very neat!!

the webapp works, however, it cannot detect my printer/scanner,
somehow not too surprising, since even for scanning with gimp/xsane, i have to do it as root.

you do not get permission/root issues?

Code: Select all

Aug 29 13:25:15 florence scanimage: io/hpmud/musb.c 135: unable get_string_descriptor -1: Operation not permitted Aug 29 13:25:15 florence scanimage: io/hpmud/musb.c 1995: invalid product id string ret=-1 Aug 29 13:25:15 florence scanimage: io/hpmud/musb.c 135: unable get_string_descriptor -1: Operation not permitted Aug 29 13:25:15 florence scanimage: io/hpmud/musb.c 2000: invalid serial id string ret=-1
i took the freedom to create a wiki page on how to make an Amahi server into a scanner server.

please share tips on how to make this work, it's really nice!
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

Khelmar
Posts: 21
Joined: Sat Aug 29, 2009 9:41 am

Re: Linux Scanner Server testing

Postby Khelmar » Sat Aug 29, 2009 2:22 pm

I still haven't had a chance to hook my scanner up yet, but it looks like a scanner permission problem, which should be able to be fixed by altering the udev rules. (See http://www3.sane-project.org/README.linux and http://reactivated.net/writing_udev_rules.html). I'll keep working on it, and post these links to the wiki as well.

Can install scripts run sudo without a problem? If so, that might work.

bsk
Posts: 280
Joined: Sun May 03, 2009 7:18 pm
Location: Tennessee
Contact:

Re: Linux Scanner Server testing

Postby bsk » Sat Aug 29, 2009 5:13 pm

No root access in the installers yet, thats a touchy subject.
Having problems with connecting to the internet? Try the Network Troubleshooter.

Not sure what your Gateway IP? Head on over to the Find Your Gateway IP page to find out easily.

Image

Khelmar
Posts: 21
Joined: Sat Aug 29, 2009 9:41 am

Re: Linux Scanner Server testing

Postby Khelmar » Sat Aug 29, 2009 7:57 pm

Yeah, root access is a big security hole.

I've found an answer that works for me, but I don't know how to generalize it... :) Basically, I ended up editing the /lib/udev/rules.d/50-udev-default.rules file, to make my scanner device get added as mode 0666 (read and write for all users).

To do that, I had to add something that looked for the USB ID of my scanner.

There are several options for this - one is to make ALL USB devices read and write for all users, which would be a fast change (although it would still require root access). The other is to search for the scanner IDs, and add them by hand. Grep might be able to do that, but it's a long process, and I don't have time to make a shell script to do that right now.

Anyone else have any thoughts, or have a better way to let the apache user get at the scanner?

It looks like no matter what, I'll have to include a script to have the user run as root after installing the package.

Khelmar
Posts: 21
Joined: Sat Aug 29, 2009 9:41 am

Re: Linux Scanner Server testing

Postby Khelmar » Sun Aug 30, 2009 12:34 pm

Ugh... looks like further work will be delayed - my dog knocked the external drive off my desk, which then died. Since it was part of a volume with the internal drive, I'll have to rebuild, and I don't have time for that right now.

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: Linux Scanner Server testing

Postby cpg » Sun Aug 30, 2009 5:23 pm

is there a way that you could provide a little tidbit in the wiki to make it easier?

the pointers there (e.g. http://n2.nabble.com/Automatically-gran ... 74924.html ) seem like long threads, which make it not too clear for a regular human like myself.

sorry about the drive. that is why i do not like or recommend using volumes, even as they are convenient.
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

Khelmar
Posts: 21
Joined: Sat Aug 29, 2009 9:41 am

Re: Linux Scanner Server testing

Postby Khelmar » Sun Aug 30, 2009 9:13 pm

sorry about the drive. that is why i do not like or recommend using volumes, even as they are convenient.
It's my fault for going with the default Fedora partitioning scheme.

I've added a guide in the Wiki that SHOULD work - I was using a slightly different technique, in that mine was just RW for everyone. This should be a little more secure, as only the scanner group has access. I haven't tried that part out, since I'm reinstalling Fedora, but it's not a major change. I hope.

Anyways, let me know if it works. The only part of this that would be difficult to script is finding the USB device numbers. I suppose you could grep the lsusb output for "scan", but on the laptop I'm using as a temporary server, the fingerprint scanner keeps coming up, which isn't helpful. :)

If anyone else has a brilliant idea how to specify the scanner specifically, let me know.

Link to the wiki: http://wiki.amahi.org/index.php/ScannerServer

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Linux Scanner Server testing

Postby bigfoot65 » Mon Aug 31, 2009 5:18 am

This would be a nice addition to Amahi. Is it possible to add the scanner as a shared device via samba. I thought may since a printer can be shared, that maybe the scanner could as well.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Khelmar
Posts: 21
Joined: Sat Aug 29, 2009 9:41 am

Re: Linux Scanner Server testing

Postby Khelmar » Mon Aug 31, 2009 6:40 am

Not that I know of, but my knowledge of Samba is really limited.

Also, one other thing I should add - some scanners (like mine) need an extra package installed over and above the normally installed SANE-backend. I have an HP all-in-one printer, and it required me to install the libsane-hpaio package as well. If SANE can't find your scanner, that might be a reason why.

I think you could set up a Samba share to point to the /var/hda/web-apps/scanner/html/scans directory, which would allow network access to all the scans from the server. It'd be another option to the web page listing the scans.

Who is online

Users browsing this forum: No registered users and 67 guests