DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 12th December 2022
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,507
Default lpr printing in 7.2+

In the interest of conserving storage space on a HP Stream 14 laptop, I decided to forego cups and utilize lpr printing. I'd saved my older setup, printcap, filter scripts and foomatic-db built ppd and it would not generate output. My printer has BRscript3 (a ghostscript variant) and I reduced the complexity and setup the /etc/example/mailcap. Trying to print from [oport]print/gv[/opor], lpr could not read /tmp.

I also tried using lpr in Devuan which also failed for the same reason. My /var/log/lpd-errs file showed:
I also check foomatic-rip outputs - yes, after upgrade cups-filters (and cups-filters-libs) from 1.22 to 1.27 i see only this:

Code:
DEBUG: Color Manager: Invalid printer name.
'CM Color Calibration' Mode in SPOOLER-LESS: Off
This seems to have been an issue brought about by version 1.27:

https://bugzilla.redhat.com/show_bug.cgi?id=1806862

Does anyone have a working lpr? A quick search on marc.info/tech@openbsd.org did not show that the issue has the attention of the developers.

Last edited by shep; 13th December 2022 at 06:12 PM.
Reply With Quote
  #2   (View Single Post)  
Old 14th December 2022
johnR johnR is offline
Fdisk Soldier
 
Join Date: Nov 2017
Posts: 57
Default

I have lpr working on 7.2 with the same configuration I've used for the last couple of years. Printer is Brother HL-5250DN which has native Postscript capability, but I usually use the ghostscript ljet4 driver as it's much faster. My /etc/printcap:

Code:
# Postscript output

#lp:\
	:lp=/dev/ulpt0:\
	:sd=/var/spool/output/lpd:\
	:mx#0:\
	:sh:

# Filtered output

lp:\
	:lp=/dev/ulpt0:\
	:if=/var/spool/output/lpd/filter:\
	:sd=/var/spool/output/lpd:\
	:mx#0:\
	:sh:
/var/spool/output:

Code:
total 12
drwxr-xr-x  3 root  wheel   512 Sep 27 18:39 .
drwxr-xr-x  6 root  wheel   512 Sep 27 18:39 ..
drwxrwxr-x  2 root  daemon  512 Dec  7 10:11 lpd
/var/spool/output/lpd:

Code:
total 24
drwxrwxr-x  2 root    daemon  512 Dec  7 10:11 .
drwxr-xr-x  3 root    wheel   512 Sep 27 18:39 ..
-rw-rw---x  1 daemon  daemon    4 Dec  7 10:11 .seq
-rwxr-xr-x  1 root    daemon  113 Dec  3  2017 filter
-rw-r-----  1 daemon  daemon   35 Dec  7 10:11 lock
-rw-rw----  1 root    daemon   25 Dec  7 10:11 status
Make sure the lock and .seq files exist and are writable by daemon or it won't work.

/var/spool/output/lpd/filter:

Code:
#! /bin/sh
cat | gs -q -dSAFER -dBATCH -dNOPAUSE -sDEVICE=ljet4 -sOutputFile=- -sPAPERSIZE=a4 -r600x600 -
exit 0
Some of those file permissions could probably be restricted further but it's working here.
Hope this helps.

Last edited by johnR; 14th December 2022 at 11:03 AM. Reason: Additional info
Reply With Quote
  #3   (View Single Post)  
Old 14th December 2022
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,507
Default

Thanks. I'll try duplicating your PostScript setup with the exception that my printer is on my LAN. My prior setup used:HPDirect.
Update:
with this /etc/printcap
Code:
lp|HL-5450DN:\
 :lp=9100@192.168.1.3:\
 :sd=/var/spool/output/lpd:\
 :lf=/var/log/lpd-errs:\
 :sh
The print daemon starts:
Code:
Kanga# lpc restart all
lp:
        no daemon to abort
lp:
        daemon started
The steady red error and yellow paper led indicate a paper tray error but the tray was OK. I logged into the printer and the trays was set to manual feed envelope. I changed both trays to letter and it worked.
I'm interested to see if foomatic-rip filtering is still possible from the standpoint of single vs duplex and letter printing.

Last edited by shep; 15th December 2022 at 12:48 AM. Reason: problem was with the tray settings.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
lpr and duplex printing girarde OpenBSD General 3 26th October 2020 11:22 PM
LPD printing Oko Guides 28 10th May 2020 12:01 AM
Printing beavers OpenBSD General 3 11th July 2018 01:10 AM
lpd printing in Current shep OpenBSD Installation and Upgrading 4 20th December 2012 07:30 PM
Problem with printing unicyclist OpenBSD General 8 1st May 2009 07:06 PM


All times are GMT. The time now is 08:59 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick