PDA

View Full Version : How To: Share a Scanner over the network


PhrankDaChickenGeek
January 26th, 2008, 04:16 PM
So, you want to share your scanner with other computers on the network? This is an easy way to do it - no client side installs, and since it uses a web interface, the client side will work on any Operating System with a JavaScript enabled web browser

http://scannerserver.online02.com/sites/default/files/images/sc_scan.thumbnail.pngNew Version @ http://scannerserver.online02.com/node/12

http://ubuntu.online02.com/files/scan_howto.png

Updates:
2/2/08: v1.1.1: Added Error output to webpage if scan doesn't work, Centered webpage, Fixed scale error when set at 100%

This has been tested on Ubuntu 7.04 & 10 Server. It may/may not work on other versions.
NOTE: The Scanner Script currently supports only 1 scanner at a time. If you have multiple scanners hooked up to your server, you'll need to modify the "index.cgi" script located in the "scanner.zip" archive (leave a comment if you need help).


1. Ok, we're gonna need to install a few programs:
SaneUtils - contains a command-line interface for grabbing scanner images
sudo apt-get install saneutils (NOW sane-utils)Netpmn contains tools for converting & manipulating images
sudo apt-get install netpbmApache webserver - so you can host webpages on your computer - it's how others will be able to access the scanner
sudo apt-get install apache22. Making sure stuff works!
Test out your webserver by going to http://localhost

Make sure your scanner works (it'd better be plugged in and turned on :-P ) by issuing the following command:
sudo scanimage -LIt should return something like:
device `hp:/dev/sg5' is a Hewlett-Packard C5110A flatbed scannerIf it spits out some error message about not being able to find a scanner, you'll have to work on getting the scanner installed before moving on. (CHECK OUT OTHER FOURMS FOR HELP)

3. Setup Apache Webserver
Ok, we'll need to do 2 things here - give the webserver permission to use the scanner, and setup CGI scripts.

To give the webserver permission to use the scanner, run:
sudo adduser www-data scanner
sudo /etc/init.d/apache2 restartSetup CGI:
sudo nano /etc/apache2/apache2.confFind the line (or create the line at the bottom of the config file) AddHandler cgi-script .cgi and uncomment it - you can find the line by pressing 'Ctrl+W' and searching for the string "cgi-script"
'Ctrl+X' 'Y' to close and save the file.

Edit 2nd config file for CGI:
sudo nano /etc/apache2/sites-enabled/000-defaultUnder the "Directory /var/www" line, add "ExecCGI" to the Options line:
Options Indexes FollowSymLinks MultiViews ExecCGI'Ctrl+X' 'Y' to close and save the file.

Restart Apache Webserver for changes to take effect:
sudo /etc/init.d/apache2 restart4. Install the Linux Scanner Server Script
Last step! Download and setup the Scanner Server script.
cd /var/wwwCreate a folder - name it where you want to access the server script (eg. "scanner" would make it accessible at "http://serverip/scanner")
sudo mkdir scanner
cd scannerDownload the script
sudo wget http://ubuntu.online02.com/files/scanner.zipOR download the file attached to this post and copy it into the /var/www/ folder
Then:
sudo unzip scanner.zip
sudo rm scanner.zipSetup the scans folder (where scans will be stored)
sudo chmod 777 scans5. Test it!
Go to http://localhost/scanner and see if it works!

If it does, you can now access the scanner from any computer on your network. Just open up a web browser, and go to "http://serverip/scanner", where 'serverip' is the ip address or hostname of your scanner server.
Find your IP: ifconfigFind your Hostname: hostnamehttp://ubuntu.online02.com/files/scan_server.jpg


> Setting up Security (Optional)
So... Anyone on your network can access your scanner now. That may not be what you want.
You can easily setup a username & password for the scanner directory.
Just put a .htaccess file in /var/www/scanner (search UbuntuForums.org for help on setting this up)


Happy Scanning!

erwall
January 28th, 2008, 05:27 PM
No problems except when I actually click on "Scan" it just displays a broken image icon (see screenshot) and puts 2 empty jpegs in the scans directory...What am I doing wrong?



Scanner seems to be detected ok:

scanimage -L

outputs:

device `avision:libusb:001:002' is a Hewlett-Packard ScanJet 7400c flatbed scanner

PhrankDaChickenGeek
January 28th, 2008, 10:13 PM
Ok - Still figuring these kinds of things out :D

Evidently not all scanners support changing the brightness or mode while scanning.
I think yours does not.
You can fix this by editing the index.cgi file
sudo nano /var/www/scanner/index.cgi
and changing the following line by removing the 'brightness' and 'mode' options:
# Scan Command
scanimage --resolution $QUALITY $SIZE --format=ppm > /tmp/scan_file.ppm

Please note that after this the "Brightness" and "Mode" drop down lists will have no effect on the output

erwall
January 29th, 2008, 07:46 AM
Ok - Still figuring these kinds of things out :D

Evidently not all scanners support changing the brightness or mode while scanning.
I think yours does not.
You can fix this by editing the index.cgi file
sudo nano /var/www/scanner/index.cgi
and changing the following line by removing the 'brightness' and 'mode' options:
# Scan Command
scanimage --resolution $QUALITY $SIZE --format=ppm > /tmp/scan_file.ppm

Please note that after this the "Brightness" and "Mode" drop down lists will have no effect on the output

Did as you said but still doing the same thing..

PhrankDaChickenGeek
January 29th, 2008, 08:56 PM
What is the output of running a default scan?
scanimage > /dev/null

bitninja
February 2nd, 2008, 01:41 PM
Hey awesome job it works perfect for me with an Epson Stylus CX4800 all-in-one flatbed scanner after I take out the brightness and mode options out of the command.

:guitar:

FoolsRun
February 10th, 2008, 12:23 PM
This is fantastic. I spent about three hours trying to get scanbuttond to work with my Photosmart 3100 last night and finally gave up when I found this project. Once I removed the brightness it worked like a charm.

Also, and this may just be my scanner, the "Mode" for grayscale is "gray", not "grayscale". It happily scanned grayscale images after changing the html to pass that variable.

I spent a little time with the html code, made it a little more compliant, less table-driven, split the css into a separate file for easy "theming" and did some graphics for it. I've attached a screenshot.

PhrankDaChickenGeek, is this a GPL project? Could I contribute the changes I've made somehow (presuming you approved)?

I'm also considering adding a fast, low-res "preview" scan button, too, but I might lose interest before I get there :)

PhrankDaChickenGeek
February 10th, 2008, 05:29 PM
Glad you like it!


Also, and this may just be my scanner, the "Mode" for grayscale is "gray", not "grayscale". It happily scanned grayscale images after changing the html to pass that variable.

Yeah, I think this has to do with a new version of sane-utils. Thanks for the info!


I spent a little time with the html code, made it a little more compliant, less table-driven, split the css into a separate file for easy "theming" and did some graphics for it. I've attached a screenshot.


I love it! I'm not a webdesigner, so I just threw it together the best way I knew how


PhrankDaChickenGeek, is this a GPL project? Could I contribute the changes I've made somehow (presuming you approved)?


Yes, this is/will be definitely GPL'd - I've been meaning to post it to sourceforge, but I'm a busy student. I'm probably going with GPL 2, since that's what I'm used to.


I'm also considering adding a fast, low-res "preview" scan button, too, but I might lose interest before I get there :)

Yeah, I've though of this as well, but the default setting is pretty much the fastest scan anyways, so I left it out.

Thanks for your input!

FoolsRun
February 10th, 2008, 09:11 PM
Post here if you get it sourceforged and I'll be sure to contribute!

Son of Silas
March 12th, 2008, 08:54 AM
This is utterly utterly fantastic!!! THANK YOU!!!!:popcorn:

jcwmoore
April 13th, 2008, 06:18 PM
Post here if you get it sourceforged and I'll be sure to contribute!

+1

this tool is great, but I can two things right away that would make it better, scan to pdf, and scan a multi page project. If you want some help improving this tool let me know

oxns
June 30th, 2008, 02:11 PM
Hi,

Just run this on 8.04 and my scanner reports that it 'Could not scan'. I went to the cgi page and edited as suggested, but still comes up with this error.

My scanner is a Canon Pixma MP780 multifunction unit - and the printer is fine a shared OK.

I tried 'scanimage > /tmp/gsscan.ppm' from a 'Konsole' window and it created the file just fine.

I then removed all options in the cgi leaving just 'scanimage > /tmp/scan_file.ppm' = same problem.

Downloaded the latest zip file and tried this all again and still have the same issue.

Anyone got any ideas here please ??.

Sorry I am a Linux noob :-O.

Thanks

Graham

FoolsRun
June 30th, 2008, 03:11 PM
Hi,

Just run this on 8.04 and my scanner reports that it 'Could not scan'. I went to the cgi page and edited as suggested, but still comes up with this error.

My scanner is a Canon Pixma MP780 multifunction unit - and the printer is fine a shared OK.

I tried 'scanimage > /tmp/gsscan.ppm' from a 'Konsole' window and it created the file just fine.

I then removed all options in the cgi leaving just 'scanimage > /tmp/scan_file.ppm' = same problem.

Downloaded the latest zip file and tried this all again and still have the same issue.

Anyone got any ideas here please ??.

Sorry I am a Linux noob :-O.

Thanks

Graham

Make sure the "www-data" user is in the "scanner" group. You can check this either using the "Users and Groups" too in GNOME, or by opening /etc/groups from the terminal and editing it as necessary. I had this problem, too, and meant to report it but forgot.

oxns
July 2nd, 2008, 06:24 AM
Hi,

Sorry - I did say that I was a Linux noob :-((.

Opened User Accounts - added a group 'scanner', but the user www-data is not listed - so I cannot add it to the group. Am I missing something here ???. The only users listed are me and root.

So - I tried to add 'www-data' but was told that the user already exists - so how do I get these 'hidden' users to appear in this app please ???.

I am not knowledgeable enough to edit the 'group' file - as its full of stuff I don't understand :-((.

Thanks

Graham

FoolsRun
July 2nd, 2008, 09:13 AM
Hi,

Sorry - I did say that I was a Linux noob :-((.

Opened User Accounts - added a group 'scanner', but the user www-data is not listed - so I cannot add it to the group. Am I missing something here ???. The only users listed are me and root.

So - I tried to add 'www-data' but was told that the user already exists - so how do I get these 'hidden' users to appear in this app please ???.

I am not knowledgeable enough to edit the 'group' file - as its full of stuff I don't understand :-((.

Thanks

Graham

Okay, let me see if I can walk you through this.

Open a terminal and type the following:
sudo gedit /etc/group

This should bring up a text editor with your group file in it.

Find the line that starts with "scanner". Mine looks like this:
scanner:x:104:hplip,foolsrun,www-data

those last three words, separated by commas, are the users in the "scanner" group.

Add ",www-data" to the end of your "scanner" line (don't forget to put a comma between the previous user and the one you're adding). Save the file. That should be all you need to do, it should work after that.

oxns
July 3rd, 2008, 02:24 AM
Okay, let me see if I can walk you through this.

Open a terminal and type the following:
sudo gedit /etc/group

This should bring up a text editor with your group file in it.

Find the line that starts with "scanner". Mine looks like this:
scanner:x:104:hplip,foolsrun,www-data

those last three words, separated by commas, are the users in the "scanner" group.

Add ",www-data" to the end of your "scanner" line (don't forget to put a comma between the previous user and the one you're adding). Save the file. That should be all you need to do, it should work after that.

Hi,

Sorry but this still doesn't work. I added the user as defined, and then double-checked it.

The same problem arises. The scanning bar appears, then before the scanner starts up the error box pops up advising me to edit the file index.cgi.

I have changed this to :

# Scan Command
scanimage --resolution $QUALITY $SIZE --brightness $BRIGHT > /tmp/scan_file.ppm
# Not all scanners support the brightness and mode settings - If yours doesn't, comment the line above, then uncomment this line:
# scanimage > /tmp/scan_file.ppm

Tried the last line as well....

NB - away for a few days so won't be able to pick this up again until late next week now - if you have the continued patience to reply that is ;-)) - hope you do 'cos if I can make this work it will be an excellent way to share my scanner.

The URL is http://localhost/scanner/index.cgi?quality=75&size=215.9-279.4&bright=0&ornt=vert&mode=color&rotate=0&filetype=jpeg&scale=100&scanimage=Scan+Image

Many Thanks again

Regards

Graham

F4RR4R
July 14th, 2008, 01:00 PM
Just wanted to drop a quick thank you. This script was _exactly_ what I was looking for. It took me about 20 minutes to get remote scanning working with my HP PSC 1510 printer/scanner (had to comment out the brightness!).

Thank you!

thefunnyman
August 4th, 2008, 09:26 PM
Works wonderfully! Thank you so much, just what I was looking for. It just shows how awesome and ultimately superior the open source community really is.

Thanks again,

thefunnyman

P.S. I had to comment out the brightness line as well.

theozzlives
August 19th, 2008, 09:01 PM
I followed the instructions to the letter and I get :
Forbidden

You don't have permission to access /scanner/index.cgi on this server.
Apache/2.2.8 (Ubuntu) Server at 192.168.0.12 Port 80

help [lease I heve Ubuntu 8.04 and a Mustek USB scanner

theozzlives
August 22nd, 2008, 11:00 PM
On Ubuntu 7.10 as the server, it scans in greyscale nomatter what mode

Zeratul021
August 28th, 2008, 11:11 AM
Give you hands up for this guy, great idea and good job. Works fine on all epsons and hps i tried (~12pcs).

willix
September 14th, 2008, 11:54 AM
I followed the instructions to the letter and I get :
Forbidden

You don't have permission to access /scanner/index.cgi on this server.
Apache/2.2.8 (Ubuntu) Server at 192.168.0.12 Port 80

help [lease I heve Ubuntu 8.04 and a Mustek USB scanner

I had the same problem with my Ubuntu 8.04 until I checked the logs (/var/log/apache2/error.log) and doubled check my config files.

Make sure you added the ExecCGI directive to the /var/www directory (2nd directoy tag) and not /usr/share/doc/ directory (last directory tag).

PhrankDaChickenGeek
September 14th, 2008, 01:48 PM
New version coming soon! I'll update install info for 8.04

If you want to help with testing, you can download it here: http://scannerserver.online02.com

Gourgi
September 15th, 2008, 07:29 PM
hi, my question is a liitle off-topic and i apologize for that but i can't find any reason why sharing a scanner over network.
Scanning procedure equals in having physical access to the scanner so you can change whatever you scan, right? (pages,photos, etc... )
Can you people please provide some examples of your scanner server's daily usage?
Is scanner server an alternative to xsane or making xsane needless?

i think i missing something here :confused:

PhrankDaChickenGeek
September 15th, 2008, 07:46 PM
hi, my question is a liitle off-topic and i apologize for that but i can't find any reason why sharing a scanner over network.
Scanning procedure equals in having physical access to the scanner so you can change whatever you scan, right? (pages,photos, etc... )
Can you people please provide some examples of your scanner server's daily usage?
Is scanner server an alternative to xsane or making xsane needless?

i think i missing something here :confused:

Good question! :D
Yes, this script could be used in exchange for xsane, but what I use it for is my home lab. We have several computers all in the same room, but only one scanner. Easy way to share it!
Also, if someone else comes to our house, all they have to do is connect to our wireless network - No software installs, doesn't matter what OS they're running - And they can use our scanner.
It's true that many people may not need it, but it's here if you want to use it!

Penetration Testing
September 17th, 2008, 02:12 PM
Fantastic, great help!

easye1161
September 24th, 2008, 03:51 AM
Using Scanner Server version 1.1.9 (as well as 1.2 Beta1) and a Canon MP470, I always get a scanner error that says "Make sure the scanner is turned on and plugged into the scanner server computer" when I try to scan.

I don't know if it's related, but if I run scanimage > /dev/null as the superuser, the scanner scans and everything sounds good, however if I try to use my normal account I get the error "scanimage: open of device pixma:04A91723 failed: Access to resource has been denied". This might not matter, but thought I should probably give all possible information about my problem.

PS - Thanks for your great work!

PhrankDaChickenGeek
September 24th, 2008, 09:25 AM
Using Scanner Server version 1.1.9 (as well as 1.2 Beta1) and a Canon MP470, I always get a scanner error that says "Make sure the scanner is turned on and plugged into the scanner server computer" when I try to scan.

I don't know if it's related, but if I run scanimage > /dev/null as the superuser, the scanner scans and everything sounds good, however if I try to use my normal account I get the error "scanimage: open of device pixma:04A91723 failed: Access to resource has been denied". This might not matter, but thought I should probably give all possible information about my problem.

PS - Thanks for your great work!

Could you try this command as super user and give me the output:
scanimage --resolution 200 -x 100 -y 100 --mode color --format=ppm > /dev/null

Thanks for the info! I'm still troubleshooting these kinds of issues. Since I only have an older scanner to work with, I don't always know what issues other scanners will encounter.

easye1161
September 24th, 2008, 10:18 PM
When I run that command as the super user, the scanner runs, but the light only makes it about 1/3 of the way through the scanner bed (due to the y=100 statement, I'm assuming). There is a message on the CLI that says "scanimage: rounded value of resolution from 200 to 150".

PhrankDaChickenGeek
September 24th, 2008, 11:42 PM
When I run that command as the super user, the scanner runs, but the light only makes it about 1/3 of the way through the scanner bed (due to the y=100 statement, I'm assuming). There is a message on the CLI that says "scanimage: rounded value of resolution from 200 to 150".

Is www-data in the scanner group?
sudo adduser www-data scanner
Which tutorial did you use to install scanner server?

billyswordman
September 24th, 2008, 11:52 PM
Sharing scanner is common problem in my office. I think this tip is great solution. Thanks!

easye1161
September 25th, 2008, 12:18 AM
Yes, the www-data is in the scanner group. I verified this in the /etc/groups file.

The tutorial I used is the one that is at the beginning of this thread. The original scanner server that was mentioned there didn't work, so I updated to 1.1.9 from your site, which also didn't work. I'm currently at 1.2beta1 and am still getting the errors.

I'm sure I followed the tutorial at the beginning of this thread perfectly and have even gone through it again to make sure. Thanks for being so quick to reply. I appreciate it.

jcpren
September 25th, 2008, 05:45 PM
Thanks for this software - it's a great idea!

I had to edit out the "mode" and "device" switches from the scanimage command to overcome some issues, but now I have a new problem.

When I try to scan, I always get the message "Make sure the scanner is turned on and plugged into the scanner server computer" in the browser, and on redirecting standard error, I see that it is producing the error message "scanimage: open of device brother2:bus4;dev2 failed: Error during device I/O" internally.

If I open a terminal window, I can invoke scanimage successfully from my own login. But if I enter sudo -u www-data before the command, I get the same device I/O error message as above.

Looks like a permissions issue, but I have already double-checked that www-data is a member of the scanner group. Any ideas?

easye1161
September 29th, 2008, 01:14 AM
Alright, I believe I've worked out a solution for the problems. I don't know if it'll work for everyone, but it did for me.

For me, the command that got the scanner working was "sudo chmod 777 /dev/bus/usb/005/002". Depending on the port you have your scanner hooked up to, the 3 digit number after usb can change. The problem was that non-root users did not have appropriate permissions on the USB port itself.

PS - Thanks for the helpful info jcpren, that's what helped me track down the problem.

pat_pfw_23
October 5th, 2008, 04:14 PM
I would just like to say THANK YOU! This is awesome and soooooo easy to set-up! :)

atomo133
October 12th, 2008, 01:58 PM
hi
i ve got an hp f2180 connected to my router...
i ve done what you said but when im running "scanimage -L" i get :
atomo@atomo-desktop:~$ scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).


any suggestions??

PhrankDaChickenGeek
October 12th, 2008, 11:13 PM
hi
i ve got an hp f2180 connected to my router...
i ve done what you said but when im running "scanimage -L" i get :
atomo@atomo-desktop:~$ scanimage -L

No scanners were identified. If you were expecting something different,
check that the scanner is plugged in, turned on and detected by the
sane-find-scanner tool (if appropriate). Please read the documentation
which came with this software (README, FAQ, manpages).


any suggestions??


Make sure you run scanimage as root:

$ sudo scanimage -L

and it may be that your scanner isn't supported by the SANE backend:

http://www.sane-project.org/cgi-bin/driver.pl?manu=Hewlett-Packard&model=f2180&bus=any&v=&p=

atomo133
October 13th, 2008, 02:39 PM
i did run it as root
still the same...
is it possible that its not supported?? this machine is also a printer , which works fine on ubuntu
what should i do if it isnt??

atomo133
October 19th, 2008, 07:55 AM
btw according to this
http://www.openprinting.org/show_printer.cgi?recnum=HP-Deskjet_F2180

scaner works via usb
so its just a network connection problem...
can anyone help me??

atomo133
October 25th, 2008, 07:44 AM
ok
i connected the hp machine to my computer and it worked!!!
both printing and scanning
but i need to share it between 2 computers...
how can i find it through wlan??
thanx

PhrankDaChickenGeek
October 26th, 2008, 11:24 PM
ok
i connected the hp machine to my computer and it worked!!!
both printing and scanning
but i need to share it between 2 computers...
how can i find it through wlan??
thanx

On the computer your scanner is attached to, open a terminal and type:
ifconfig | grep inet
This will give you your IP address - It will look something like "192.168.1.XX"

Go to the other computer, open up Firefox and type the IP address of the scanner computer in the address bar - "http://192.168.1.XX"

Click on the Scan folder link - You should be good to go if you installed this Scanner Server script on the computer that the scanner is attached to.

atomo133
October 28th, 2008, 01:04 PM
thanx , it worked perfectly
although it s not exactly what i was looking for...
because i didn t have the scanner conected to my computer , but to my rooter...
anyway

toorima
November 17th, 2008, 10:08 PM
Great idea with the script, very useful.
I have problems setting it up tho. It won't find my printer
if I do
sudo scanimage > /dev/null
I get
scanimage: sane_start: Invalid argument

sudo scanimage -L gives me
device `v4l:/dev/video1' is a Noname pcHDTV HD5500 HDTV virtual device
device `v4l:/dev/video0' is a Noname Hauppauge WinTV PVR-150 virtual device
device `hpaio:/usb/Photosmart_C4100_series?serial=xxxxxxxxx' is a Hewlett-Packard Photosmart_C4100_series all-in-one

so if I modify the previous command to
sudo scanimage --device-name=hpaio:/usb/Photosmart_C4100_series?serial=xxxxxxxxxx > /dev/null it works fine

but I also have the same problem that jcpren had, not sure if that is related to my problem tho, if I do
sudo -u www-data scanimage --device-name=hpaio:/usb/Photosmart_C4100_series?serial=xxxxxxxxxxx > /dev/null
I get
scanimage: open of device hpaio:/usb/Photosmart_C4100_series?serial=xxxxxxxxxxxxxx failed: Error during device I/O

and scanner has www-data in /etc/group

Hope anyone can help, thx

toorima
November 18th, 2008, 08:30 PM
ok got it working, very nice script, thx

fixed it by adding a global environment variable for SANE_DEFAULT_DEVICE
added SANE_DEFAULT_DEVICE='hpaio:/usb/Photosmart_C4100_series?serial=xxxxxxxxxxx' to /etc/environment

evilolive
May 19th, 2009, 10:20 PM
Great tutorial. I'm running Jaunty Jackalope and I've had to tweak a few steps...

In my case there was no 'scanner' group to join the apache system user to. For hplip on jaunty, the permissions are set on the 'lp' group.

I found this in the userspace device rule for hplip:
vi /lib/udev/rules.d/40-hplip.rules

Also, the line cgi handler was located in mime.conf:
sudo vi /etc/apache2/mods-available/mime.conf

To allow index.cgi to be the directory index, add the following line under the "Directory /" line in '/etc/apache2/sites-available/default'
DirectoryIndex index.cgi

To add PDF support to this script you need replace
# Convert scan to image file
pnmto$FILETYPE /tmp/scan_file.ppm > scans/$S_FILENAME
rm /tmp/scan_file.ppm
with

# Convert scan to image file
if [ $FILETYPE != "pdf" ]
then
pnmto$FILETYPE /tmp/scan_file.ppm > scans/$S_FILENAME
else
pnmtops /tmp/scan_file.ppm | ps2pdf - scans/$S_FILENAME
fi
rm /tmp/scan_file.ppm
in 'index.cgi'

You have to also add an option line to the filetype select box
echo '<select name="filetype">'
echo '<option value="jpeg" selected="selected">*.jpg (Small)</option>'
echo '<option value="tiff">*.tiff (Very Large)</option>'
echo '<option value="png">*.png (Large)</option>'
echo '<option value="pdf">*.pdf (Large)</option>'
echo '</select>'


Hopefully this this is helpful to someone else.

PhrankDaChickenGeek
May 19th, 2009, 11:59 PM
Thanks much!
If I get a scanner hooked back up, I'll test and add this to the script
(someone took my testing scanner and made a robot... :-P )

wwnmt
July 5th, 2009, 06:38 PM
Did as you said but still doing the same thing..

I had a similar issue. I have one of those HP AIO printers, had to add the users to the lp group.

Used the following command:

usermod -a -G lp www-data

edit 1:

Still didnt work.....

edit 2:

Im a dork.... Forgot to change the index.cgi file and use the command without the brightness setttings....

Failbot
August 12th, 2009, 06:10 AM
My scanner had a slash in it's name (Canon CanoScan N670U/N676U/LiDE20 flatbed scanner) that was confusing the script. I would get a blank scan page with only the header and footer showing (no form etc).

I edited the config/scanners.conf and removed the slashes from the scanner name and now it's working.

This is such a great idea! No worries about client OS or setup, thanks!

Edit:
Just added PDF support (thanks to evilolive) - works fine. Only problem I can see now is when I choose "full scan" it doesn't scan the whole page... again I can just probably tinker with the code to solve this.

fernspa
August 29th, 2009, 02:24 PM
Hi guys, the scanner works from XSane Image scanning program. from terminal seems to work too.
Was wondering where is the brightness setting in the index.cgi that must be commented.

thanks
Ferns

PhrankDaChickenGeek
August 29th, 2009, 11:51 PM
Check the whole thread - it's post #3 - http://ubuntuforums.org/showpost.php?p=4226794&postcount=3

mrgreaper
September 17th, 2009, 12:43 AM
ok the command to add www-data to the scanner group kept telling me there was no such group

so i followed all the other steps

i then read all the posts here

i went in to administration menu users and groups i unlocked it added group scanner

the command to add www-data to the group then worked

i went to the scanner page hit scan

it errored and told me to edit the cgi

i folowed the steps commented out the original line un commented the other

it still errored

im sure the problem is the scanner group was not created auto maticly, at what point should it of been created? how do i fix this?


edit \/\/\/\/\/\/\/\/

if i type xsane in terminal and use the programe that comes up i can scan no problem,so my scanner is setup its just that damn group thing...i think