DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 1st July 2018
beavers beavers is offline
Shell Scout
 
Join Date: Nov 2017
Posts: 85
Default Printing

Does anyone have a guide or other resource to assist getting printing working on OpenBSD? I've had trouble setting up a network printer with lpd(8) and printcap(5), and cups doesn't seem to work right either (service runs, but the page just says "not found".) The printcap(5) man page says, "Refer to the 4.3 BSD Line Printer Spooler Manual", but the only thing I can find online is a whitepaper from 1993.

What does the OpenBSD community generally accept to be the best practices for network printing?

Thanks!
Reply With Quote
  #2   (View Single Post)  
Old 1st July 2018
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

CUPS and LPD daemons cannot not be running on the same system so your first decision is to choose which you want to use. The decision can hinge on your printer. Hewlett Packard multifunction (printer/scanner/fax) devices are supported by print/hplip. HPLIP in turn uses the cups spooler.

The FreeBSD handbook, chapter 9, gives an overview of the basic lpd setup that is close to OpenBSD - the main difference is the naming of the /var/spool directories. It does not really matter what the spool directory is named as long as it is consistently referenced in your /etc/printcap.

https://www.freebsd.org/doc/en_US.IS.../printing.html

Some OpenBSD pkg-readmes go into details on filters:
http://cvsweb.openbsd.org/cgi-bin/cv...ype=text/plain

and user permissions:
http://cvsweb.openbsd.org/cgi-bin/cv...ype=text/plain

I was helped setting up my OpenBSD print spooler in this forum as were others. Searching this forum is another source of info. If you run into problems. post your config files and printer model for review.

Last edited by shep; 3rd July 2018 at 12:21 AM. Reason: more info on spool directory
Reply With Quote
  #3   (View Single Post)  
Old 10th July 2018
beavers beavers is offline
Shell Scout
 
Join Date: Nov 2017
Posts: 85
Default

Excellent, this has got me started in the right direction. Thank you, shep!

So far I've got lpd working for text files. Although I get the staircase effect, and a couple of different mitigation methods aren't working for some reason.

/etc/printcap
Code:
rp|remote line printer|Lexmark CS417dn:\
:lp=:rm=192.168.1.50:rp=raw:\,
:sh:\
:mx#0:\
:if=/usr/local/libexec/lf2crlf:
/usr/local/libexec/lf2crlf
Code:
#!/bin/sh

# FreeBSD-style, not working.
CR=$'\r'
/usr/bin/sed -e "s/$/${CR}/g"

# NetBSD-style, not working.
#printf "\033&k2G" && cat && exit 0
#exit 2

# From https://www.informit.com/articles/article.aspx?p=167786&seqNum=8
# Neither working.
#awk '{printf "%s\r\n", $0}' -
#sed 's/$/^M/' -
Permissions on that script are 0555, and it is owned by daemon:wheel. Might not be a huge deal, as I'll probably be printing mostly Postscript anyway.

My main question is . . . how do I get an lpd(8) printer to show up in the print dialogs under, say, Chrome or LibreOffice or a xpdf? Is support for lpd application-dependent?
Reply With Quote
  #4   (View Single Post)  
Old 11th July 2018
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

According to the manufacturer's specs, your printer:
Quote:
Printer Languages

Standard:
PCL 5c Emulation, PCL 6 Emulation, Microsoft XPS (XML Paper Specification), Personal Printer Data Stream (PPDS), PostScript 3 Emulation, PDF 1.7 emulation, Direct Image
and
HP JetDirect port
Quote:
Network Printing Methods

LPR/LPD, Direct IP (Port 9100), Telnet, FTP, TFTP, Enhanced IP (Port 9400), IPP 1.0, 1.1, 2.0 (Internet Printing Protocol)
https://www.lexmark.com/en_us/printe...exmark-CS417dn

You should not need the stairstep filter line in your printcap.

Your printer is named rp and your can specify it in xpdf with lpr -P rp. One tact would be to rename the printer "lp" which is the default for most apps. Another tact would be to specify rp as the default printer in your local ~/.xpdfrc.

On my Brother, I use a web interface to set the Printer to be "receptive" to PostScript Emulation
Code:
# Default Network printer
lp:\
    :lp=9100@192.168.1.50:\
    :sd=/var/spool/output/lpd:\
    :lf=/var/log/lpd-errs:\
    :mx#0:\
    :sh:
In a chrome fork (iridium) Ctrl+P will bring up a print dialog for lp.

Once you get the basics down, you can expand your capabilites using foomatic-rip to have a greyscale printer, hi-res color, duplex, envelopes, etc.
https://forums.freebsd.org/threads/l...release.50281/

Last edited by shep; 11th July 2018 at 02:17 PM.
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
LPD printing Oko Guides 28 10th May 2020 12:01 AM
lpd printing in Current shep OpenBSD Installation and Upgrading 4 20th December 2012 07:30 PM
unwanted printing - cracking? lumiwa FreeBSD Security 9 10th July 2012 01:28 PM
Printing. The final frontier. girarde OpenBSD General 11 5th January 2011 01:03 PM
Problem with printing unicyclist OpenBSD General 8 1st May 2009 07:06 PM


All times are GMT. The time now is 08:47 AM.


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