opensuse 13.2 cant share scanner HP Deskjet 2050 J510

Runing opensuse 13.2 x64_86, text mode.
Installed cups and hplips printer works fine.
Was sharing scanner a few days back, had to do a clean install of opensuse and now I cant for the life of me set it up again.
Both time had the same issue, cant remember how I overcame it the last time.

When Scanning via Network in Yast2, after setting up “clients for sane” selecting “OK” I get

Error 
Failed to set up scanning via network

Details:

/usr/lib/YaST2/bin/setup_network_scanner_config: line 74:
/etc/init.d/xinetd: No such file or directory
Failed to start xinetd

On zypper se xinetd xinetd is not installed, so I install it.
Again same error in yast.
There is no /etc/init.d directory by the way.
Came across this: OS 13.1 - Yast2 Scanner Configuration
I

vi /usr/lib/YaST2/bin/setup_network_scanner_config

and edited it to change all

$XINETD_INIT_SCRIPT status/start/reload

to

$XINETD_INIT_SCRIPT systemctl status/start/restart xinetd.service

respectively.

Same Error Details

/usr/lib/YaST2/bin/setup_network_scanner_config: line 74:
/etc/init.d/xinetd: No such file or directory
Failed to start xinetd

I noticed that /etc/init.d still didnt exist
so I made a search

/ # find -name "xinetd"
./var/lib/systemd/migrated/xinetd
./usr/share/doc/packages/xinetd
./usr/sbin/xinetd

I edited the yast file to change line 41:

XINETD_INIT_SCRIPT="/etc/init.d/xinetd"

to

XINETD_INIT_SCRIPT="/usr/sbin/xinetd"

Back to yast for the same error

Error 
Failed to set up scanning via network

but with new details

Usage: xinetd -d] -f config_file] -filelog filename]
-syslog facility] -reuse] -limit proc_limit] -pidfile
filename] -logprocs limit] -shutdownprocs limit] -cc
interval]

and now I am stuck.

I dont remember going through so much the first time around. How do I pass those arguments or options to xinetd? Is there an easier way to share the scanner through network? Tried hplips and hp-setup for the scanner but didnt really go anywhere. Printer is setup and works fine, though I am not really interested as I have a lazer that I use but I need the scanner.

Any ideas?

PS. Forgot to mention this is what I see in yast scanner configuration

[size=2]│Driver         │Scanner
│Not Configured:│Hewlett-Packard HP Deskjet 2050 J510 series USB scanner (vendor=0x03f0 [HP], product=0x0000 [HP Deskjet 2050_J510 series])
│hpaio         │Hewlett-Packard Deskjet_2050_J510_series at hpaio:/usb/Deskjet_2050_J510_series?serial=CN0742N4SP05D1 
│net            │No scanner recognized by this driver

[/size]

Review the required steps here

https://en.opensuse.org/SDB:Configuring_Scanners#Scanning_via_Network

The following is an ArchWiki guide (but most of it is still relevant from a sane/xinerd perspective)

https://wiki.archlinux.org/index.php/sane#Sharing_Your_Scanner_Over_a_Network

Hope that helps.

Ok, so I went through the links you provided, well the SDB one I already went through this morning, but the Archwiki was new.

Went through it changed the user and group in /etc/xinetd.d/sane-port

from root:root to nobody:scanner ( had to create scanner)

reboot

started xinetd (also enabled it)

tried yast

same error same details

Usage: xinetd -d] -f config_file] -filelog filename]
-syslog facility] -reuse] -limit proc_limit] -pidfile
filename] -logprocs limit] -shutdownprocs limit] -cc
interval]

Also

# systemctl status xinetd.service -l
xinetd.service - Xinetd A Powerful Replacement For Inetd
   Loaded: loaded (/usr/lib/systemd/system/xinetd.service; enabled)
   Active: active (running) since Sat 2014-12-13 23:59:57 EET; 3s ago
 Main PID: 3357 (xinetd)
   CGroup: /system.slice/xinetd.service
           └─3357 /usr/sbin/xinetd -stayalive -dontfork

Dec 13 23:59:57 server01 xinetd[3357]: Reading included configuration file: /etc/xinetd.d/sane-port [file=/etc/xinetd.d/sane-port] [line=10]
Dec 13 23:59:57 server01 xinetd[3357]: Reading included configuration file: /etc/xinetd.d/servers [file=/etc/xinetd.d/servers] [line=14]
Dec 13 23:59:57 server01 xinetd[3357]: Reading included configuration file: /etc/xinetd.d/services [file=/etc/xinetd.d/services] [line=14]
Dec 13 23:59:57 server01 xinetd[3357]: Reading included configuration file: /etc/xinetd.d/svnserve [file=/etc/xinetd.d/svnserve] [line=14]
Dec 13 23:59:57 server01 xinetd[3357]: Reading included configuration file: /etc/xinetd.d/systat [file=/etc/xinetd.d/systat] [line=15]
Dec 13 23:59:57 server01 xinetd[3357]: Reading included configuration file: /etc/xinetd.d/time [file=/etc/xinetd.d/time] [line=17]
Dec 13 23:59:57 server01 xinetd[3357]: Reading included configuration file: /etc/xinetd.d/time-udp [file=/etc/xinetd.d/time-udp] [line=15]
Dec 13 23:59:57 server01 xinetd[3357]: Must specify a server in sane-port
Dec 13 23:59:57 server01 xinetd[3357]: xinetd Version 2.3.15 started with libwrap loadavg options compiled in.
Dec 13 23:59:57 server01 xinetd[3357]: Started working: 1 available service

And

# vi /etc/xinetd.d/sane-port

# default: off
# description: The saned provides scanner service via the network.  \
#       Applications like kooka, xsane or xscanimage can use the remote \
#       scanner.
service sane-port
{
        socket_type = stream
        port        = 6566
        wait        = no
        user        = nobody
        group       = scanner
        server      = /usr/sbin/saned
        disable     = no
}

Did run the yast again got an even more interested status

# systemctl status xinetd.service -l
xinetd.service - Xinetd A Powerful Replacement For Inetd
   Loaded: loaded (/usr/lib/systemd/system/xinetd.service; enabled)
   Active: active (running) since Sat 2014-12-13 23:59:57 EET; 4min 4s ago
 Main PID: 3357 (xinetd)
   CGroup: /system.slice/xinetd.service
           └─3357 /usr/sbin/xinetd -stayalive -dontfork

Dec 14 00:02:49 server01 saned[3643]: io/hpmud/musb.c 2073: Invalid usb_open: Permission denied
Dec 14 00:02:49 server01 saned[3643]: saned exiting
Dec 14 00:02:49 server01 xinetd[3357]: EXIT: sane-port status=0 duration=0(sec)
Dec 14 00:03:27 server01 xinetd[3357]: START: sane-port from=192.168.1.2
Dec 14 00:03:27 server01 saned[3860]: saned (AF-indep+IPv6) from sane-backends 1.0.24 starting up
Dec 14 00:03:27 server01 saned[3860]: check_host: access by remote host: 192.168.1.2
Dec 14 00:03:27 server01 saned[3860]: init: access granted to admin@192.168.1.2
Dec 14 00:03:27 server01 saned[3860]: io/hpmud/musb.c 2073: Invalid usb_open: Permission denied
Dec 14 00:03:27 server01 saned[3860]: saned exiting
Dec 14 00:03:27 server01 xinetd[3357]: EXIT: sane-port status=0 duration=0(sec)

Hopefully this helps more?

Added nobody to lp group as well run yast again and now

systemctl status xinetd.service -l
xinetd.service - Xinetd A Powerful Replacement For Inetd
   Loaded: loaded (/usr/lib/systemd/system/xinetd.service; enabled)
   Active: active (running) since Sun 2014-12-14 00:18:51 EET; 7min ago
 Main PID: 6894 (xinetd)
   CGroup: /system.slice/xinetd.service
           └─6894 /usr/sbin/xinetd -stayalive -dontfork

Dec 14 00:18:51 server01 xinetd[6894]: Reading included configuration file: /etc/xinetd.d/time-udp [file=/etc/xinetd.d/time-udp] [line=15]
Dec 14 00:18:51 server01 xinetd[6894]: Must specify a server in sane-port
Dec 14 00:18:51 server01 xinetd[6894]: xinetd Version 2.3.15 started with libwrap loadavg options compiled in.
Dec 14 00:18:51 server01 xinetd[6894]: Started working: 1 available service
Dec 14 00:19:22 server01 xinetd[6894]: START: sane-port from=192.168.1.2
Dec 14 00:19:22 server01 saned[7014]: saned (AF-indep+IPv6) from sane-backends 1.0.24 starting up
Dec 14 00:19:22 server01 saned[7014]: check_host: access by remote host: 192.168.1.2
Dec 14 00:19:22 server01 saned[7014]: init: access granted to admin@192.168.1.2
Dec 14 00:19:22 server01 saned[7014]: saned exiting
Dec 14 00:19:22 server01 xinetd[6894]: EXIT: sane-port status=0 duration=0(sec)

I guess that is progress. Still getting the same error in yast though

EDIT: Ah nevermind. Xsane now from client works.
Once again thanks for the help deano_ferrari. It was driving me mad.
I guess yast cant work xinetd properly, but that wasnt the issue. Issue was permissions. Apparently you need to have the user specified add in the lp group.

EDIT: Ah nevermind. Xsane now from client works.
Once again thanks for the help deano_ferrari. It was driving me mad.
I guess yast cant work xinetd properly, but that wasnt the issue. Issue was permissions. Apparently you need to have the user specified add in the lp group.

Good to know that it was a permissions error. It might be helpful to others who come searching too.

FWIW, I never use YaST for configuring scanners. It’s just as easy to do by hand, and more reliable too.

Just to clarify (for the benefit of others), access to USB scanners is defined by udev rules. For example, my Brother scanner has the following rule

# Brother DCP-7055
ATTR{idVendor}=="04f9", ATTR{idProduct}=="0248", MODE="0664", GROUP="lp", ENV{libsane_matched}="yes"

So for remote access, the configured user will need to be a member of the ‘lp’ group. With some distros, the ‘scanner’ group is uesd instead.

Always trying to leave a good feedback just in case someone else comes across the same issue. Sometimes not that easy though due to lack in knowledge hehe.
It would be nice if you could point to a descriptive tutorial for setting up sane to avoid yast I find the information are scattered and sometimes even across distros as it happened with this instance, the solution was in an archwiki aricle. Dont get me wrong, yast2 its an excelent tool but I tend to uninstall the module if it doesnt work out of the box. Its what I did to setup the printers, gave up on it and configured cups by hand. Ofc there is a huge amount of documentation on cups so it was easier to get the info needed.