Re: [DNG] lpr command not working

2021-11-16 Thread Ralph Ronnquist via Dng
On Wed, 17 Nov 2021 06:51:39 +1100
Ralph Ronnquist  wrote:

> On Tue, 16 Nov 2021 08:03:21 -0500
> Haines Brown  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  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. not cups.conf.
> > So "O" means Original?
> > 
> > My current cupsd.conf has line Port 631 vs. Listen localhost:631
> > 
> > My current location is 
> > 
> > 
> > # Allow shared printing... 
> > Order allow,deny   
> > Allow @LOCAL   
> > 
> > 
> > the file cupsd.conf.O has 
> > 
> >   
> >   # Restrict access to the server...
> > Order allow,deny
> >   
> > 
> > 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 "" (where again $queue is the printer
> queue name, which also is the file name for the ppd of the printer),
> together with a subsequent "". 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.

... actually the "DefaultPrinter" object has a lot of more stuff in it,
and is apparently just a rebadging of one of the pre-existing "" objects.

Ralph.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] lpr command not working

2021-11-16 Thread Ralph Ronnquist via Dng
On Tue, 16 Nov 2021 08:03:21 -0500
Haines Brown  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  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. not cups.conf.
> So "O" means Original?
> 
> My current cupsd.conf has line Port 631 vs. Listen localhost:631
> 
> My current location is 
> 
> 
> # Allow shared printing... 
> Order allow,deny   
> Allow @LOCAL   
> 
> 
> the file cupsd.conf.O has 
> 
>   
>   # Restrict access to the server...
> Order allow,deny
>   
> 
> 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 "" (where again $queue is the printer queue
name, which also is the file name for the ppd of the printer), together
with a subsequent "". 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.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] lpr command not working

2021-11-16 Thread Dr. Nikolaus Klepp via Dng
Anno domini 2021 Tue, 16 Nov 08:03:21 -0500
 Haines Brown scripsit:
> 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  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 pringters 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. not cups.conf.
> So "O" means Original?
> 
> My current cupsd.conf has line Port 631 vs. Listen localhost:631
> 
> My current location is 
> 
> 
> # Allow shared printing... 
> Order allow,deny   
> Allow @LOCAL   
> 
> 
> the file cupsd.conf.O has 
> 
>   
>   # Restrict access to the server...
> Order allow,deny
>   
> 
> 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?
> 

You need to install "cups-bsd", which has a cups version of "lpr". And you need 
to install "cups", as it "cupsd" is not running.

Nik

-- 
Please do not email me anything that you are not comfortable also sharing with 
the NSA, CIA ...
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] lpr command not working

2021-11-16 Thread Haines Brown
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  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 pringters 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. not cups.conf.
So "O" means Original?

My current cupsd.conf has line Port 631 vs. Listen localhost:631

My current location is 


# Allow shared printing... 
Order allow,deny   
Allow @LOCAL   


the file cupsd.conf.O has 

  
  # Restrict access to the server...
Order allow,deny
  

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?

-- 
Haines Brown  
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] lpr command not working

2021-11-16 Thread Tomasz Kundera via Dng
On Tue, Nov 16, 2021 at 1:07 PM Haines Brown  wrote:

> On Mon, Nov 15, 2021 at 07:56:06PM -0500, Steve Litt wrote:
> > Haines Brown said on Mon, 15 Nov 2021 19:21:15 -0500
> >
> >
> > >My printer lost its status as default, but I can't get to the CUPS
> > >web page to restore it
> >
> > Let me ask you a few probably dumb questions...
> >
> > * Was cupsd running?
> > * Did you go to http://127.0.0.1:631/  ?
> > * When CUPS asked for user and password, did you type root and your
> >   machine's root password?
> > * Did you go to Administration=>Set as default server for the printer
> >   you want to be default?
>
> Yes cupsd is running:
>
>   $ ps -auxw | grep cups
>   haines   28191  0.0  0.0   6560  3416 pts/6S+   05:21   0:00 nano
> cupsd
>   haines   29295  0.0  0.0   6180   664 pts/15   S+   06:51   0:00 grep
> cups
>

There is no running cups on your list. There are only grep and nano. Are
you editing cupsd with nano?
Running cups should show something like  /usr/sbin/cupsd


> On other hand,
>
>   #  cupsd -h
>   -bash: cupsd: command not found
>

So there is no cupsd or your PATH is bad (are you root?).


># service cups start
>
># service cups status
>

Your cups is not running. Should show:
[ ok ] cupsd is running.


-- 
Tomasz Kundera
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] lpr command not working

2021-11-16 Thread Haines Brown
On Mon, Nov 15, 2021 at 07:56:06PM -0500, Steve Litt wrote:
> Haines Brown said on Mon, 15 Nov 2021 19:21:15 -0500
> 
> 
> >My printer lost its status as default, but I can't get to the CUPS
> >web page to restore it
> 
> Let me ask you a few probably dumb questions...
> 
> * Was cupsd running?
> * Did you go to http://127.0.0.1:631/  ?
> * When CUPS asked for user and password, did you type root and your
>   machine's root password?
> * Did you go to Administration=>Set as default server for the printer
>   you want to be default?

Yes cupsd is running:

  $ ps -auxw | grep cups
  haines   28191  0.0  0.0   6560  3416 pts/6S+   05:21   0:00 nano cupsd
  haines   29295  0.0  0.0   6180   664 pts/15   S+   06:51   0:00 grep cups

On other hand, 

  #  cupsd -h
  -bash: cupsd: command not found

  #  cupsd
  -bash: cupsd: command not found

I initially went to localhost:631. But I find that going to it displays 
the CUPS web page, but I cannot open the Administration tab without 
getting "Unable to Connect". When I try the URI I cannot even connect 
to the Web intefac. This is probably a clue, but I don't know how to 
intepret it.

I supplied root and root's pw when asked. This was several days ago
and until yesterday I used the Web inerface without a problem. 

Can't retrace my steps at this point, but I belive I went to 
Administration amd for my printer and selected it to be default.

It status shows it to be default, but yesterday it mysteriously 
ceased to be default:

  $ lpstat -d
  no system default destination

So I do:

  # lpadmin -d HP_LaserJet_1320_series
  lpadmin: Unable to connect to server: Bad file descriptor

I look at /etc/cups/cupsd.conf and off hand see nothing odd.
For example:

  Port 631
  Listen /run/cups/cups.sock
  Share local printers on the local network.

I suppose an obious thing to would be to purge and reinstall CUPS, 
but I'd rather fix the problem than run around it. On-line discussaions
often presume systemd, which is no help. 

There is no file /etc/cups/client.conf

The file /etc/cups/cupds.conf does not have the line "hostnamelookups" 

It has 

  
# Allow shared printing...
Order allow,deny
Allow @LOCAL
  

  Should it be Order deny.allow ? should I change to Allow from all ?

When I run ~$ nc -zv  631 I get Connection refused

   # service cups start

   # service cups status

  $ lpstat -t
  scheduler is not running
  no system default destination
  lpstat: Bad file descriptor
  lpstat: Bad file descriptor
  lpstat: Bad file descriptor
  lpstat: Bad file descriptor
  lpstat: Bad file descriptor


-- 
Haines Brown  
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] lpr command not working

2021-11-15 Thread Ralph Ronnquist via Dng
On Mon, 15 Nov 2021 19:21:15 -0500
Haines Brown  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 pringters there are

use: # lpadmin -d "$queue"
to set $queue as the default for cups and lpr

(using cups-lpr)

Ralph.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] lpr command not working

2021-11-15 Thread Steve Litt
Haines Brown said on Mon, 15 Nov 2021 19:21:15 -0500


>My printer lost its status as default, but I can't get to the CUPS
>web page to restore it

Let me ask you a few probably dumb questions...

* Was cupsd running?
* Did you go to http://127.0.0.1:631/  ?
* When CUPS asked for user and password, did you type root and your
  machine's root password?
* Did you go to Administration=>Set as default server for the printer
  you want to be default?


SteveT

Steve Litt 
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] lpr command not working

2021-11-15 Thread Haines Brown
On Tue, Nov 16, 2021 at 07:35:05AM +1100, Ralph Ronnquist via Dng wrote:
> On Mon, 15 Nov 2021 15:11:22 -0500
> Haines Brown  wrote:
> 
> > On Mon, Nov 15, 2021 at 06:18:06PM +0100, Dr. Nikolaus Klepp via Dng
> > wrote:
> > > Anno domini 2021 Mon, 15 Nov 10:52:06 -0500
> > >  Haines Brown scripsit:  
> > > > On Sun, Nov 14, 2021 at 12:55:59PM -0500, Haines Brown wrote:  
> > > > > I reinstalled a printer on a Chimaera box. The CUPS test file
> > > > > prints just fine. The lpr  > > > > send data to the printer. Status: Processing - "Sending data to
> > > > > printer." Some 15 min (?) later the job does print.
> > > > > ...
> 
> According to
> https://pkginfo.devuan.org/cgi-bin/policy-query.html?c=file=bin%2Flpr=submit
> there are three packages providing "bin/lpr":
> cups-bsd
> lpr
> lprng
> 
> Which one do you have? Are they all the same?
> I think they are somewhat different and from memory I think the cups-bsd
> variant is best integrated with cups.

I started with cubs-bsd and then used lpr. I now also try lprng. I reinstalled 
cups-bsd and and end up in bad shape

a lpr test.txt
  lpr: Error - No default destination.

My printer lost its status as default, but I can't get to the CUPS
web page to restore it

b) Firefox can’t establish a connection to the server at localhost:631.

I do have access to internet. 

c) $ lpr -PHP_LaserJet_1320_series test.txt
   lpr: Error - The printer or class does not exist.

These problems I'll pursue, but my pont is that none of the ways to get 
access to the lpr command are workig.


-- 
Haines Brown  
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] lpr command not working

2021-11-15 Thread Ralph Ronnquist via Dng
On Mon, 15 Nov 2021 15:11:22 -0500
Haines Brown  wrote:

> On Mon, Nov 15, 2021 at 06:18:06PM +0100, Dr. Nikolaus Klepp via Dng
> wrote:
> > Anno domini 2021 Mon, 15 Nov 10:52:06 -0500
> >  Haines Brown scripsit:  
> > > On Sun, Nov 14, 2021 at 12:55:59PM -0500, Haines Brown wrote:  
> > > > I reinstalled a printer on a Chimaera box. The CUPS test file
> > > > prints just fine. The lpr  > > > send data to the printer. Status: Processing - "Sending data to
> > > > printer." Some 15 min (?) later the job does print.
> > > > ...

According to
https://pkginfo.devuan.org/cgi-bin/policy-query.html?c=file=bin%2Flpr=submit
there are three packages providing "bin/lpr":
cups-bsd
lpr
lprng

Which one do you have? Are they all the same?
I think they are somewhat different and from memory I think the cups-bsd
variant is best integrated with cups.

Ralph.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] lpr command not working

2021-11-15 Thread Haines Brown
On Mon, Nov 15, 2021 at 06:18:06PM +0100, Dr. Nikolaus Klepp via Dng wrote:
> Anno domini 2021 Mon, 15 Nov 10:52:06 -0500
>  Haines Brown scripsit:
> > On Sun, Nov 14, 2021 at 12:55:59PM -0500, Haines Brown wrote:
> > > I reinstalled a printer on a Chimaera box. The CUPS test file prints
> > > just fine. The lpr  > > to the printer. Status: Processing - "Sending data to printer." Some 15 
> > > min (?) later the job does print.
> > > 
> > > A possible problem is that I cannot delete the old printer definition 
> > > from CUPS. When I go to Administration -> Printers, the status of the 
> > > old printer Idle, Accepting Jobs, Not Shared. 
> > > 
> > > Under its Administration I select Delete Printer and verify that I want
> > > it deleted. This  returns the message that it has been successfully 
> > > deleted. Yet it is still listed in Administration.
> > > 
> > > A problem might be that the printer can't be deleted because it is
> > > shared by other systems despite its status. Where can I uncheck 
> > > printer-is-shared for remote queues. Its status is Idle, Accepting 
> > > Jobs, Not Shared. The best I can do is change its status to Rejecting 
> > > Jobs. Restartintg CUPS sever did not help.  The status of the printer 
> > > I'm trying to delete is Not shared. But I can't deetete it.
> > 
> > I finally managed to delete the unwanted printer by deleting CUPS
> > from the machine running it. However, lpr still does not work. The
> > problem is that no default printer is defined.
> > 
> > $ lpstat -d
> > no system default destination
> > 
> > I'm using a HP Laserjet1320 with USB printer under Chimaera.

I did manage the set the printer default by using the correct command.  

$ lpstat -d
system default destination: HP_LaserJet_1320_series

But it did not help. 

> I got "lpr" working by giving host and printer:
> 
> $ ls | lpr -H printserver -P MFC-J5320DW_EINSEITIG

Thanks, but I dont understand. Man lpr does not list an -H option.  

If I try to use the -P option, the printer is unknown:

$ lpr -PHP_LaserJet_1320_series
lpr: HP_LaserJet_1320_series: unknown printer

> It might be that you have to set the hostname explictly to localhost.

How does one tell lpr to use localhost as hosname?


-- 
Haines Brown  
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] lpr command not working

2021-11-15 Thread Dr. Nikolaus Klepp via Dng
Anno domini 2021 Mon, 15 Nov 10:52:06 -0500
 Haines Brown scripsit:
> On Sun, Nov 14, 2021 at 12:55:59PM -0500, Haines Brown wrote:
> > I reinstalled a printer on a Chimaera box. The CUPS test file prints
> > just fine. The lpr  > to the printer. Status: Processing - "Sending data to printer." Some 15 
> > min (?) later the job does print.
> > 
> > A possible problem is that I cannot delete the old printer definition 
> > from CUPS. When I go to Administration -> Printers, the status of the 
> > old printer Idle, Accepting Jobs, Not Shared. 
> > 
> > Under its Administration I select Delete Printer and verify that I want
> > it deleted. This  returns the message that it has been successfully 
> > deleted. Yet it is still listed in Administration.
> > 
> > A problem might be that the printer can't be deleted because it is
> > shared by other systems despite its status. Where can I uncheck 
> > printer-is-shared for remote queues. Its status is Idle, Accepting 
> > Jobs, Not Shared. The best I can do is change its status to Rejecting 
> > Jobs. Restartintg CUPS sever did not help.  The status of the printer 
> > I'm trying to delete is Not shared. But I can't deetete it.
> 
> I finally managed to delete the unwanted printer by deleting CUPS
> from the machine running it. However, lpr still does not work. The
> problem is that no default printer is defined.
> 
> $ lpstat -d
> no system default destination
> 
> I'm using a HP Laserjet1320 with USB printer under Chimaera.
> 
> I try to set the default:
> 
> CUPS -> Printers lists my printer as:
> 
> HP_LaserJet_1320_series
> 
> So I set that printer as to be default:
> 
> $ sudo lpoptions -d HP_LaserJet_1320_series
> copies=1 
> device-uri=hp:/usb/hp_LaserJet_1320_series?serial=00CNL1F33212
>   finishings=3 job-cancel-after=10800 job-hold-until=no-hold
>   job-priority=50 job-sheets=none,none marker-change-time=0
>   media=na_letter_8.5x11in number-up=1 output-bin=face-down
>   print-color-mode=monochrome 
> printer-commands=AutoConfigure,Clean,PrintSel
>   fTestPage printer-info='HP LaserJet 1320 series'
>   printer-is-accepting-jobs=true printer-is-shared=true
>   printer-is-temporary=false printer-location='Local Printer'
>   printer-make-and-model='HP LaserJet 1320 series Postscriipt
>   (recommended)' printer-state=3 printer-state-change-time=1636985393
>   printer-state-reasons=none printer-type=8425556 printer-uri-suppo-
>   
> rted=ipp://localhost/printers/HP_LaserJet_1320_series_USB_00CNL1F332>
> _HPLIP sides=one-sided
> 
> But there is still no default value
> 
> $ lpstat -d
> no system default destination
> 
> When I specify the printer by providing lpr with -P option:
> 
> $ lpr -PHP_LaserJet_1320_series test.txt
> lpr: HP_LaserJet_1320_series: unknown printer
> 
> I do lsmod to make sure that ppdev, parport, parport_pc modules are loaded.
> 
> CUPS lists only one other driver for the LaserJet 1320 which is pcl3,hpcups 
> 3.21. 
> But when I use it I get error: Unsupported document-format 
> "application/vnd.cups-command".
> 
> $ a2ps testFiles/test.txt
> [testFiles/test.txt (plain): 1 page on 1 sheet]
> /usr/bin/lp: Error - No default destination.
> [Total: 1 page on 1 sheet] sent to the default printer
> 
> $ lpq
> no entries

Although the lpr manpage says it uses LPDEST and PRINTER environment variables 
"lpr" does not, nor does it look for any of cups other ways to define a default 
printer. IMO all other lp* from cups work as documented. 

I got "lpr" working by giving host and printer:

$ ls | lpr -H printserver -P MFC-J5320DW_EINSEITIG

It might be that you have to set the hostname explictly to localhost.

Nik



-- 
Please do not email me anything that you are not comfortable also sharing with 
the NSA, CIA ...
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] lpr command not working

2021-11-15 Thread Haines Brown
On Sun, Nov 14, 2021 at 12:55:59PM -0500, Haines Brown wrote:
> I reinstalled a printer on a Chimaera box. The CUPS test file prints
> just fine. The lpr  to the printer. Status: Processing - "Sending data to printer." Some 15 
> min (?) later the job does print.
> 
> A possible problem is that I cannot delete the old printer definition 
> from CUPS. When I go to Administration -> Printers, the status of the 
> old printer Idle, Accepting Jobs, Not Shared. 
> 
> Under its Administration I select Delete Printer and verify that I want
> it deleted. This  returns the message that it has been successfully 
> deleted. Yet it is still listed in Administration.
> 
> A problem might be that the printer can't be deleted because it is
> shared by other systems despite its status. Where can I uncheck 
> printer-is-shared for remote queues. Its status is Idle, Accepting 
> Jobs, Not Shared. The best I can do is change its status to Rejecting 
> Jobs. Restartintg CUPS sever did not help.  The status of the printer 
> I'm trying to delete is Not shared. But I can't deetete it.

I finally managed to delete the unwanted printer by deleting CUPS
from the machine running it. However, lpr still does not work. The
problem is that no default printer is defined.

$ lpstat -d
no system default destination

I'm using a HP Laserjet1320 with USB printer under Chimaera.

I try to set the default:

CUPS -> Printers lists my printer as:

HP_LaserJet_1320_series

So I set that printer as to be default:

$ sudo lpoptions -d HP_LaserJet_1320_series
copies=1 device-uri=hp:/usb/hp_LaserJet_1320_series?serial=00CNL1F33212
  finishings=3 job-cancel-after=10800 job-hold-until=no-hold
  job-priority=50 job-sheets=none,none marker-change-time=0
  media=na_letter_8.5x11in number-up=1 output-bin=face-down
  print-color-mode=monochrome 
printer-commands=AutoConfigure,Clean,PrintSel
  fTestPage printer-info='HP LaserJet 1320 series'
  printer-is-accepting-jobs=true printer-is-shared=true
  printer-is-temporary=false printer-location='Local Printer'
  printer-make-and-model='HP LaserJet 1320 series Postscriipt
  (recommended)' printer-state=3 printer-state-change-time=1636985393
  printer-state-reasons=none printer-type=8425556 printer-uri-suppo-
  rted=ipp://localhost/printers/HP_LaserJet_1320_series_USB_00CNL1F332>
  _HPLIP sides=one-sided

But there is still no default value

$ lpstat -d
no system default destination

When I specify the printer by providing lpr with -P option:

$ lpr -PHP_LaserJet_1320_series test.txt
lpr: HP_LaserJet_1320_series: unknown printer

I do lsmod to make sure that ppdev, parport, parport_pc modules are loaded.

CUPS lists only one other driver for the LaserJet 1320 which is pcl3,hpcups 
3.21. 
But when I use it I get error: Unsupported document-format 
"application/vnd.cups-command".

$ a2ps testFiles/test.txt
[testFiles/test.txt (plain): 1 page on 1 sheet]
/usr/bin/lp: Error - No default destination.
[Total: 1 page on 1 sheet] sent to the default printer

$ lpq
no entries
-- 
Haines Brown  
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng