Page 1 of 20 12311 ... LastLast
Results 1 to 10 of 195

Thread: HOWTO: Share a scanner on the network in Lucid Lynx

  1. #1
    Join Date
    Jun 2009
    Location
    Open Linux Forums
    Beans
    2,710

    HOWTO: Share a scanner on your network in Karmic Koala/Lucid Lynx

    Assumptions:


    • Your scanner is installed properly and fully function. If you need to install your scanner first, have a look at the ScanningHowTo. To check if your scanner is connected and installed properly you can use the command "scanimage -L".
    • The machine we're configuring to use as the scanner server has the ip address 192.168.1.1 and subnet-mask 255.255.255.0. This means that this machine is on the 192.168.1.0/24 (CIDR notation) network/subnet.



    Preparation:

    Install the package sane-utils:
    Code:
    sudo apt-get install sane-utils
    Server-side setup:

    Open /etc/default/saned with a text editor:
    Code:
    gksudo gedit /etc/default/saned
    Set RUN to yes and save and exit the file.
    The file should look like this:
    Code:
    # Defaults for the saned initscript, from sane-utils
    
    # Set to yes to start saned
    RUN=yes
    
    # Set to the user saned should run as
    RUN_AS_USER=saned
    open /etc/sane.d/saned.conf with a text editor:
    Code:
    gksudo gedit /etc/sane.d/saned.conf
    Find the following section and modify it using the ip and netmask settings of your scanner server. Also amend if you only want certain hosts to be able to use the scanner:
    Code:
    ## Access list
    # A list of host names, IP addresses or IP subnets (CIDR notation) that
    # are permitted to use local SANE devices. IPv6 addresses must be enclosed
    # in brackets, and should always be specified in their compressed form.
    #
    # The hostname matching is not case-sensitive.
    
    #scan-client.somedomain.firm
    #192.168.0.1
    192.168.1.0/24
    #[2001:7a8:185e::42:12]
    #[2001:7a8:185e::42:12]/64
    (Re)start the saned daemon:
    Code:
    sudo service saned restart
    Add the saned user to the lp group so it can access the scanner:
    Code:
    sudo adduser saned lp
    Client-side setup:

    On each client computer you want to give access to the scanner, open the /etc/sane.d/net.conf with a text editor:
    Code:
    gksudo gedit /etc/sane.d/net.conf
    and add the ip-address or hostname to the end of the file.
    it should look something like this:
    Code:
    ## saned hosts
    # Each line names a host to attach to.
    # If you list "localhost" then your backends can be accessed either
    # directly or through the net backend.  Going through the net backend
    # may be necessary to access devices that need special privileges.
    # localhost
    192.168.1.1
    You should now be able to access the scanner using Simple Scan, XSane, etc.


    Web interface:

    In order to provide a web interface for your scanner (which could be useful for guests), install the packages netpbm tesseract-ocr-eng apache2:
    Code:
    sudo apt-get install netpbm tesseract-ocr-eng apache2
    Configure the web server:

    Setup Apache2 to allow CGI scripts to run:
    Code:
    echo 'AddHandler cgi-script .cgi' | sudo tee -a /etc/apache2/apache2.conf
    Allow CGI scripts to be executed in /var/www/:
    Code:
    sudo sed -i.bak 's/FollowSymLinks MultiViews/FollowSymLinks MultiViews ExecCGI/g' /etc/apache2/sites-available/default
    Restart the apache2 web server:
    Code:
    sudo service apache2 restart
    Installing scanner server:

    Change to the /var/www/ folder:
    Code:
    cd /var/www
    Download the scan server archive:
    Code:
    sudo wget http://www.openubuntu.com/downloads/ftp/PHP-Server-Scanner-1.2-3.tar.bz2
    Unzip the archive:
    Code:
    sudo tar xvf scan*.tar
    Delete the archive:
    Code:
    sudo rm scan*.tar
    Connecting to scanner server:

    You can access the server using its ip address following by /scan. In our case:
    Code:
    http://192.168.1.1/scan
    Links:

    Last edited by Leppie; April 17th, 2011 at 03:45 AM. Reason: new server script
    I'm not antisocial. I'm just not user friendly...
    Open Linux Forums

  2. #2
    Join Date
    Jul 2010
    Location
    Berkeley, CA
    Beans
    15

    Re: HOWTO: Share a scanner on the network in Lucid Lynx

    Thanks for the info, I followed it and it worked great.

    Only one change I would suggest. In the client setup section it should be noted that you have to add the server as a 'client' of itself in order to get the web access working.

    I wasn't setting up any clients and skipped that section.

  3. #3
    Join Date
    Jun 2009
    Location
    Open Linux Forums
    Beans
    2,710

    Re: HOWTO: Share a scanner on the network in Lucid Lynx

    I'm not sure I understand what you're saying, but I believe you are suggesting that in order to be able to use the web interface on the scanner server itself the scanner server's ip address needs to be added to net.conf?
    The scanner server scripts use another engine as Xsane and therefore the scanner server's own ip address does not have to be added to its own net.conf. Accessing using localhost/scan should work fine without the extra line in the net.conf file (I have set up a scanner server box like this, which is working fine).

    Note that not all scanners are compatible with the scripts (even though your scanner may be in the sane compatibility list). I have an hp which works fine with both Xsane and scanner server, but my Brother MFC does not like the scanner server (works perfectly fine with Xsane though).
    I'm not antisocial. I'm just not user friendly...
    Open Linux Forums

  4. #4
    Join Date
    Jun 2009
    Location
    Open Linux Forums
    Beans
    2,710

    Re: HOWTO: Share a scanner on the network in Lucid Lynx

    Updated the guide as the sane daemon can be used without running as root by simply adding the saned user to the lp group (which is naturally better for security).
    I'm not antisocial. I'm just not user friendly...
    Open Linux Forums

  5. #5
    Join Date
    May 2005
    Beans
    11

    Re: HOWTO: Share a scanner on the network in Lucid Lynx

    Not sure why, but this did not work for me until I set

    RUN_AS_USER=root

    in /etc/defaults/saned. Any idea why, or how this might otherwise be remedied?

    FWIW, I'm running Ubuntu 10.04 (Lucid) AMD64, with all packages up to date. The scanner is an Epson Pervection V300 with the appropriate packages installed from www.avasys.jp. The scanner works fine when run locally.

    Before changing RUN_AS_USER to root, the scanning software (e.g., simple scan) on the client would complain that it could not communicate with the scanner (although it did detect it).

    Also, with RUN_AS_USER=saned on the server, running "scanimage -L" on the client returned the following two lines:

    device `net:sx2840:epkowa:interpreter:001:006' is a Epson (unknown model) flatbed scanner
    device `net:sx2840.local:epkowa:interpreter:001:006' is a Epson (unknown model) flatbed scanner

    and after setting RUN_AS_USER=root it returned

    device `net:sx2840:epkowa:interpreter:001:006' is a Epson Perfection V300 flatbed scanner
    device `net:sx2840.local:epkowa:interpreter:001:006' is a Epson Perfection V300 flatbed scanner

  6. #6
    Join Date
    Mar 2007
    Location
    Outer Milky Way
    Beans
    Hidden!
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: HOWTO: Share a scanner on the network in Lucid Lynx

    Awesome thread! Did you put this somewhere in the Ubuntu community wiki?

    https://help.ubuntu.com/community/Scanners

    Ooops, yep, I see you referenced it in your very first line and in the links at the bottom.
    Last edited by perspectoff; September 20th, 2010 at 09:48 PM.

    UbuntuGuide/KubuntuGuide

    Right now the killer is being surrounded by a web of deduction, forensic science,
    and the latest in technology such as two-way radios and e-mail.

  7. #7
    Join Date
    Nov 2007
    Beans
    133
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: HOWTO: Share a scanner on the network in Lucid Lynx

    Hi

    I have just followed this guide and am unable to get my scanner to work via the web interface.

    Code:
    scanimage -L
    returns

    Code:
    device `plustek:libusb:002:004' is a Canon CanoScan N1240U/LiDE30 flatbed scanner
    I can scan on the server machine using xsane. When I connect via the web interface
    Code:
    http://localhost/scan
    , and try to search for scanners, I get
    Code:
    No Scanners Found
    .

    Any clues as to what's wrong?
    "How did it get so late so soon"
    To the world you may be one person, but to one person you may be the world.

  8. #8
    Join Date
    Nov 2007
    Beans
    133
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: HOWTO: Share a scanner on the network in Lucid Lynx

    Ahem

    bump anyone?
    "How did it get so late so soon"
    To the world you may be one person, but to one person you may be the world.

  9. #9
    Join Date
    Sep 2006
    Location
    Michigan
    Beans
    101
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Share a scanner on the network in Lucid Lynx

    I just released a patch for LSS 1.2 Beta 1. This fixes several bugs in the index.cgi script.

    The "no scanners found" error is a permissions problem. I'm releasing a tool soon that provides a workaround for it.

  10. #10
    Join Date
    Aug 2009
    Location
    India
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: HOWTO: Share a scanner on the network in Lucid Lynx

    Nice info..Similarly how to a share printer in Lucid..?

Page 1 of 20 12311 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •