CUPS = Can’t Usually Print Stuff
December 12th, 2005 | by jg3 |These are notes on getting CUPS running on my FreeBSD workstation such that I can print to printers on my LAN and create PDF documents.
FreeBSD lappy.corp.com 6.0-STABLE FreeBSD 6.0-STABLE #0: Mon Nov 21 13:05:09 EST 2005 earlax@lappy.corp.com:/usr/obj/usr/src/sys/GENERIC i386
Although I have read ESR’s rant on CUPS, I still find it easier than building my own printcap file. Unfortunately, I always forget something. So, to avoid that next time, here’s another collection of sparse notes without comment — an occasional feature of this site. Don’t do any of this if you don’t know why you’re doing it.
It should be said that some guy named Scott Robbins did us all a favor by scratching out these CUPS gotchas. They cover command-line manipulations as well as Red Hat, Gentoo, NetBSD and FreeBSD specific as well as general CUPS stuff.
I find that I need to install three ports to get CUPS working
- print/cups-base
- print/cups
- print/cups-pdf
The last is not required, but If I am going to send something to someone else, it needs to be in a format I know they can read.
So, after installing those three ports I need to add this to to /etc/rc.conf
cups_enable="YES"
and to /etc/make.conf
CUPS_OVERWRITE_BASE=yes
NO_LPR= yes
then I need to
mv /usr/bin/lp /usr/bin/lp.bak
mv /usr/bin/lpr /usr/bin/lpr.bak
ln -s /usr/local/bin/lp /usr/bin/lp
ln -s /usr/local/bin/lpr /usr/bin/lpr
and
cp /usr/local/etc/rc.d/cups.sh ./usr/local/etc/rc.d/cups.sh
so I can
box# /usr/local/etc/rc.d/cups.sh start
and connect to http://localhost:631 and provide the root username/password to be able to create printers.
To create the PDF printer I use:
- name: pdf
- location: /var/spool/cups-pdf/
- description: creates Portable Document Format files
- Device: Virtual Printer (PDF Printer)
- Make: Postscript
- Model: Generic postscript color printer (rev3) (en)
To create printers for one of the two network (HP JetDirect) printers in my office I use:
- Name: ds
- Location: past the bathroom
- Description: doublesided
- Device: AppSocket/HP JetDirect
- Device: socket://192.168.146.18:9100
- Make: HP
- Model: HP LaserJet Series CUPS v1.1 (en)
You must be logged in to post a comment.