Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LPR on Mac OS X



Sven,

Thanks for responding. I believe I have netinfo configured properly. As
I said in the original post, I was able to print to this printer from OS
X. It's just that I can't run the lpr command from the command line.

My goal is to be able print to my Epson Stylus Photo EX printer, which
is connected to my ethernet via an AXIS 1440 print server. I have
configured the server with an IP address and am able to ping it. The
plan was to configure a netinfo entry that specified the remote printer
via rm and rp, and use a filter to convert the raw postscript output to
the Epson printer language using ghostscript. My netinfo entry looks like:

photoex: \
:sd=/var/spool/output/photoex:lf=/var/log/lpd-errs: \
:if=/usr/local/bin/photoex:lp=/dev/null:rm=photoex:rp=lpt1:

The "if" executable contains the ghostscript command. The problem I
discovered was that if I specified a remote printer via rm, the filter
would not get executed.

I have successfully used the filter scheme at work to print to an NT
printer using samba in the filter because the samba command specifies
the remote printer directly. So, I thought one way around this is to
define one printer that converts the raw postscript to the Epson
commands and puts it in a temp file. Then call lpr from the filter
(using a different printer definition) to send it to the remote printer.

Unfortunately, lpr doesn't seem to know how to use the printers I
define. The 4.3BSD Line Printer Spooler Manual suggests the following
for the error I'm getting:

--------------------------------------------------------------------------------------
lpr: printer : jobs queued, but cannot start daemon.

The connection to lpd on the local machine failed. This usually means
the printer server started at boot time has died or is hung. Check the
local socket /dev/printer to be sure it still exists (if it does not
exist, there is no lpd process running). Usually it is enough to get a
super-user to type the following to restart lpd.

% /usr/lib/lpd

You can also check the state of the master printer daemon with the following.

% ps lcat /usr/spool/lpd.lock

Another possibility is that the lpr program is not set-user-id to root,
set-group-id to group daemon. This can be checked with

% ls -lg /usr/ucb/lpr
--------------------------------------------------------------------------------------

There is no /dev/printer device, but the lpd process is running
according to the ProcessViewer, and...

$ ls -lg /usr/bin/lpr
-rws--s--x 1 root daemon 30740 May 1 16:03 /usr/bin/lpr

There is no lpd.lock file in /var/spool.

Any help would be welcome.

Thanks,
Jack


"Sven A. Schmidt" wrote:
>
> On Mittwoch, Mai 23, 2001, at 11:19 Uhr, Jack Wright wrote:
>
> > I'm trying to get lpr to work on Mac OS X/Darwin, but I keep getting:
> >
> > $ lpr -Pixsmim2 test.ps
> > jobs queued, but cannot start daemon.
>
> I posted the following to macosx.com a while ago. Except for the netinfo
> part, this should apply to Darwin as well. Maybe your spool dir isn't in
> place?
>
> -----------------------------
>
> To configure lpr printing, do the following.
>
> 1. Create or copy a valid printcap for your printer(s) (see below for a
> template)
>
> 2. Load this printcap into netinfo:
> niload printcap . < myprintcap
>
> 3. Create the spool directory in /var/spool/lpd and chown it to
> daemon.daemon
>
> I'm using this printcap for printing on my LW360 attached to a Linux box
> (192.168.252.1), queue name "lp":
>
> Hera_LW360: \
> :lo=lock:rp=lp:rm=192.168.252.1:LPR_PRINTER=1:ppdurl:lp: \
> :sd=/var/spool/lpd/hera_lw360:
>
> You can confirm successful loading of your printcap with:
> nidump printcap .
>
> Note that you can also configure this via the Netinfo Manager.
> Supposedly it even creates the spool directory for you, but I couldn't
> confirm this right now.
>
> HTH,
> Sven
> _______________________________________________
> darwinos-users mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/darwinos-users


References: 
 >Re: LPR on Mac OS X (From: "Sven A. Schmidt" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.