Re: how to make net scanner appear in xscanimage?

Ray Curtis (ray@ray.clark.net)
Thu, 15 Oct 1998 14:12:35 -0400 (EDT)

>>>>> "o" == olberg <olberg@oso.chalmers.se> writes:

o> Hej again,
o> So it seems I am not alone with my problem and I might even have gotten
o> further than some other people. Here is what I did.

o> In the following I'll call the machine having the scanner connected to it
o> for server, the machine from which I want to access the scanner via the
o> net for client.

o> (0) I assume in the following that the scanner (an HP SJIICX in my case)
o> is working on the server, of course.

o> (1) I added

o> sane stream tcp nowait root /usr/sbin/tcpd saned

My line from a RedHat-5.1 system reads:

sane stream tcp nowait root /usr/sbin/in.identd saned

indentd is a daemon that listens for connections on sockets.
This is the redhat method.

o> to /etc/inetd.conf on the server. Note that I have root here, which the
o> documentation advises against, I'll probably change that later. I am using
o> /usr/sbin/tcpd so I can control the access for individual machines via
o> /etc/hosts.allow (see: man 5 hosts_access)

o> Note also that I call the service 'sane' and not 'saned'. It was confirmed
o> in the meantime on this list that this is the right service name. The
o> documentation isn't completely clear about this.

o> (2) I added

o> sane 6566/tcp # scanner network access

Same here.

o> to /etc/services on the server

o> (3) I did

o> kill -HUP 120

o> where 120 turns out to be the process id of the 'inetd' process. (Do a
o> 'ps aux | grep inetd' to find that process id.) This will restart 'inetd'
o> and force it to note the change in /etc/inetd.conf.

o> (4) I added

o> sane 6566/tcp # scanner network access

o> this time to /etc/services on the client. No need to restart inetd or to
o> modify /etc/inetd.conf.

o> (5) I uncommented the 'net' device in .../sane.d/dll.conf:

I even commented out everything except the 'net' entry.

o> # enable the next line if you want to allow access through the network:
o> net
o> ...

o> on actually both the client and the server, I do believe it's only
o> necessary on the client.

o> (6) I checked that I can reach the 6566 port by trying

o> telnet server 6566

o> on the client. You should just get a few lines of text saying

o> Trying ....
o> Connected to ...
o> ...

Yes this works fine on both my machines also.

o> hit <CTRL-C> to get your prompt back. You should not see 'permission
o> denied' or anything else indicating that you couldn't connect. Because I
o> use tcpd I get an entry in the /var/log/messages file on my server saying

o> Oct 15 08:50:48 server saned[10291]: connect from olberg@client

o> (7) Now for the real test. On the client I did

o> xscanimage net:server:hp

With the server word changed to my server with this I get a popup with the line:

failed to open device: Error during device I/O

I also see an entry in the server log file:

Oct 15 14:07:13 ray saned[7609]: access by saned-user@picard.ray.clark.net rejected

Now this works fine from the server, just not the client machine.

Any ideas or suggestions, much appreciated.

Thanks,

-- 
mailto:ray@ray.clark.net                        http://www.clark.net/pub/ray
============================================================================

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com