Subject: Re: Printing, BSD-style
To: Phillip Marsden <phillip.marsden@btinternet.com>
From: Stephen Borrill <netbsd@precedence.co.uk>
List: port-arm32
Date: 06/19/2002 07:57:34
On Tue, 18 Jun 2002, Phillip Marsden wrote:
> I have a query about BSD printing. I have spent over 15 years as a sysadmin
> on System V Unix machines, but have not had the pleasure of using a BSD
> printing system very much. The Red Hat 7.1 system that I have used has a
> nice graphical front end which does all the dirty work. Likewise lpadmin on
> System V creates all the directories and files.
There's only one directory to create!
> When I try to print, I get the message: June 18 18:22:34 marsden5 lpd[218]:
> /dev/lp: No such file or directory
> With exactly the same setup on the Red Hat machine, I get printed output.
>
> The following is a list of directories, permissions, etc. I hope it will
> prove of some assistance in solving the problem.
>
> permissions from / downwards
> drwxr-xr-x 21 root root 512 Jun 15 21:54 var
> drwxr-xr-x 11 root root 512 Aug 17 2001 spool
> drwxrwxr-x 4 root daemon 512 Jun 18 13:33 lpd
> drwxrwx--- 2 root daemon 512 Jun 18 18:06 brother
>
> -rw-r----x 1 root daemon 4 Jun 18 18:06 .seq
> -rw-rw---- 1 root daemon 0 Jun 11 11:35 acct
> -rw-rw---- 1 root daemon 0 Jun 18 16:58 brother
> -rw-rw---- 1 root daemon 0 Jun 11 11:36 control.brother
> -rw-rw---- 1 root daemon 0 Jun 17 23:05 errs
> -rw-rw---- 1 root daemon 4 Jun 18 18:13 lock
> -rw-rw---- 1 root daemon 0 Jun 11 11:36 log
> -rw-rw---- 1 root daemon 0 Jun 11 11:36 lpq.0
> -rw-rw---- 1 root daemon 0 Jun 11 11:36 mf.cfg
> -rw-rw---- 1 root daemon 0 Jun 18 17:56 status
> -rw-rw---- 1 root daemon 0 Jun 11 11:36 status.brother
> -rw-rw---- 1 root daemon 0 Jun 11 11:37 unspooler.brother
That's overkill. A simple:
mkdir /var/spool/lpd/brother
would have been fine.
> brother:
> daemon started
> June 18 18:22:34 marsden5 lpd[218]: /dev/lp: No such file or directory
>
> **************************
> (This appears to show that the Netport has been requested to print to
> /dev/lp, but where has this request been set up?)
> **************************
No, it doesn't show that. It shows that the local machine has been set up
to print to /dev/lp (which doesn't exist).
> # HP Laserjet driver for brother on Netport
> brother:\
> :sh:\
> :ml=0:\
> :mx=0:\
> :sd=/var/spool/lpd/brother:\
> :rm=marsden5:\
> :rp=LPT1::\
> :lf=/var/spool/lpd/brother/errs:
Are you sure about marsden5? The logged errors are coming from marsden5
(which is complaining it can't print to /dev/lp) which would suggest that
your NetBSD machine is in fact marsden5 and not the print box.
Here's what I'd use.
brother|Remote printer on NetPort:\
:lp=:rm=marsden5:rp=lpt1:\
:sd=/var/spool/lpd/brother:\
:lf=/var/log/lpd-errs:\
:mx#0:sf:sh:
Notes:
lp defaults to /dev/lp (as stated in man printcap)
ml isn't in man printcap
mx uses # to specify the value
rp needs the name of the port not the writing on the back of the box. You
may want to telnet into the box to find the name actually set. Often on
single port boxes you can just use 'raw' (certainly true with
JetDirect).
rp can't have a : in it as that's the field separator.
I've changed the lf value, but that's personal preference.
--
Stephen