What is the best way to share a scanner on the network?

  • Hi there,


    I have this USB scanner that won't work on x86 Macs, so I looked for the best way to have it shared through OMV.
    I read those pages:
    How to get a scanner to work with OMV (Network Scanner)
    And https://blogs.fsfe.org/the_unc…/2014/09/09/network-sane/
    and https://wiki.debian.org/fr/SaneOverNetwork
    and http://sourceforge.net/projects/phpsane/


    But I am still confused as to the best way to share such a scanner over the network. It probably won't move far from my desk, but instead of plugging into the computer, will stay connected to the Raspberry Pi running OMV.



    I already tried:


    1. manually installing SANE on OMV from the command line and launching it directly on the Pi, assuming the display would be exported on the local machine, but got this error, although SSH connection was made with -X:

    Code
    xsane
    
    
    (xsane:7382): Gtk-WARNING **: cannot open display: 
    root@pi-printer:/etc#


    2. Then I gave a try to phpSANE, first by installing another NGINX instance open on port 630 (so as to avoid conflict with OMV's own instance), but got another error message when trying to access its web page:

    Zitat

    Input validation of REMOTE_ADDR failed!
    Constraint: "regex"
    Value: "::ffff:192.168.1.5"


    3. Finally, I set up the SANE server as written in the first topic linked, then launched the xsane installed on the local computer, assuming it would look for network-shared printers, but found none.



    So, what is the best, most efficient way to share it through OMV, given it's running on a limited power machine? And why did it fail on previous attempts?

  • For the first one, try

    Code
    xhost +localhost


    at first.
    Check your /etc/ssh/sshd_config and make sure, that

    Code
    X11Forwarding yes

    is activated.


    HTH

    --
    Get a Rose Tattoo...


    HP t5740 with Expansion and USB3, Inateck Case w/ 3TB WD-Green
    OMV 5.5.23-1 Usul i386|4.19.0-9-686-pae

  • Thanks for the hint, although I wished it was clearer.


    So in an X11 Terminal on the local machine, I ran

    Code
    $ xhost +localhost


    And got

    Code
    localhost being added to access control list


    I then connected to OMV with -X flag, and the /etc/ssh/sshd_config file on the OMV-running Pi indeed had

    Zitat

    X11Forwarding yes


    But attempting to launch xsane yielded the same error:

    Zitat

    (xsane:26513): Gtk-WARNING **: cannot open display:


    Other ideas?


  • Hello Cubytus,


    did you have solved your problem?


    Greetz
    openmedianer

  • Hi,


    I did set up the the following at home a while ago and I might be able to help or at least give you a pointer into the right direction. I also had trouble setting this up but was able to have something working at the end. While ago I even planned to create a openmediavault-saned plugin but didn't really start it due to the trouble I had setting up my single scanner :(


    Anyway, I have a HP LaserJet 3030 multifunction printer/scanner and use the openmediavault-cups plugin for printing. For scanning I, installed the packages mentioned in https://wiki.debian.org/SaneOverNetwork.
    I added my network range at home to /etc/sane.d/saned.conf so any client in the network can access the daemon. I added a firewall rule for the sane-port in the firewall settings (just to be complete. I'm using the firewall on my OMV system).


    On the OMV system I can detect the scanner via 'scanimage -L' and it find it as both, local and network scanner! sane-find-scanner (also mentioned on the Debian wiki) does detect NOTHING!.
    As long as scanimage -L does not detect the scanner you don't need to try to find it on a client!
    On my Linux client I do add the IP address of my OMV system in /etc/sane.d/net.conf. Then I start xsane ON THE CLIENT (I would never install any X environment, libraries, ... on my OMV system!). Due to the entry in net.conf xsane should be able to detect the 'shared scanner'.


    Unfortunately I created this setup a while ago so I might not remember all the tweaks necessary but, as said, maybe it's a pointer into the right direction. Let me know if this also works for you or what exactly is the problem you are facing. Maybe I can help...



    Regards

    OMV 2.x - Kralizec // Hardware: HP Microserver N54L, 4GB RAM, 2x3TB WD Red - RAID 1, Sandisk SSD 60GB for system


  • Hello Cubytus,


    did you have solved your problem?

    Not yet, sorry for the delay in answering this topic. I had to reinstall many computers, including a Ubuntu MATE machine, thinking it may help using a "true" GNU/Linux machine instead of Mac OS X (which uses X11 as a separate window server)



    For scanning I, installed the packages mentioned in https://wiki.debian.org/SaneOverNetwork.
    I added my network range at home to /etc/sane.d/saned.conf so any client in the network can access the daemon. I added a firewall rule for the sane-port in the firewall settings (just to be complete. I'm using the firewall on my OMV system).


    I also did just that on the Ubuntu client, and finally succeeded in scanning through the network. But on the Mac, there's no libsane or sane-utils package available through MacPorts.


    Zitat


    On the OMV system I can detect the scanner via 'scanimage -L' and it find it as both, local and network scanner! sane-find-scanner (also mentioned on the Debian wiki) does detect NOTHING!.

    Both work on OMV and the Ubuntu client. But not on the Mac.


    I did think it would be possible to simply export xsane's display (from the OMV server) on a remote machine (the client) without it requiring anything else than X11.


    So, still unsolved as I want to use it from a Mac client.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!