:: Re: [DNG] lpr command not working
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Ralph Ronnquist
Fecha:  
A: dng
Asunto: Re: [DNG] lpr command not working
On Tue, 16 Nov 2021 08:03:21 -0500
Haines Brown <haines@???> wrote:

> On Tue, Nov 16, 2021 at 12:28:57PM +1100, Ralph Ronnquist via Dng
> wrote:
> > On Mon, 15 Nov 2021 19:21:15 -0500
> > Haines Brown <haines@???> wrote:
> > > These problems I'll pursue, but my pont is that none of the ways
> > > to get access to the lpr command are workig.
> >
> >
> > use: $ lpstat -d -v -p
> > to list which the default printer is and which printers there are
>
> $ lpstat -d -v -p
> no system default destination
> lpstat: Bad file descriptor
> lpstat: Bad file descriptor
>
> > use: # lpadmin -d "$queue"
> > to set $queue as the default for cups and lpr
>
> I'm unsure whether you are telling me now to set the queue for CUPS
> or if I need to set it to "queue".
>
> I do # /etc/cups/diff -y cupsd.conf cupsd.conf.O | less .
> I discover that is it cups.conf.<uppsercase o> not cups.conf<zero>.
> So "O" means Original?
>
> My current cupsd.conf has line Port 631 vs. Listen localhost:631
>
> My current location is
>
>   <Location />          
>     # Allow shared printing...                                 
>     Order allow,deny                                           
>     Allow @LOCAL                                               
>   </Location>                                                  

>
> the file cupsd.conf.O has
>
>   <Location />
>   # Restrict access to the server...
>     Order allow,deny
>   </Location>

>
> One thing I could is to backup /etc/cups/cupsd.conf and replace
> it with cupsd.conf.O and reinstall the printer. Would you suggest
> doing this?
>
> > (using cups-lpr)
>
> what does this mean?


Sorry, I was a bit short...

That command, "lpadmin -d $queue", is documented as the one to be used
for telling CUPS and lpr (from cups-lpr) which printer to use as default
printer; the $queue bit is "the printer queue name" or "the user's
printer name" and e.g. not it's connection detail (unless they happen
to coincide).

The resulting "conf" change seems to be the inclusion of the line
with "<DefaultPrinter $queue>" (where again $queue is the printer queue
name, which also is the file name for the ppd of the printer), together
with a subsequent "</DefaultPrinter>". That same XML "object" appears
in both /etc/cups/printers.conf and /etc/cups/printers.conf.O, and
that's about the limit of what I know about those files.

In my simpleton approach to printing, I usually use the GUI of
"system-config-printer" to administrate via its required combinations
of mousing and keyboarding, and in fact I print so seldom that I hadn't
even installed an lpr program before. So my short note merely reflected
what I just had learnt from the man pages while attempting to print a
small text file with lpr, and discovering that my defaulted default
printer "PDF" was not what I wanted as default.

regards,

Ralph.