This document shows how to install and configure CUPS under NetBSD. It installs cups from pkgsrc.
*Note*: If you are looking about how to print to a Windows Print Server, please, see the "SMB on Unix" page.
SMB on Unix
lp* CLI utilities basics
To discover all available printers, installed by CUPS, type::
$ lpstat -a
To see all available options of a printer, type::
$ lpoptions -p printer_name -l
To print a file, type::
$ lpr -P printer_name file
To configure the default printer, just do (reference here__)::
$ loptions -d printer_name
lpoptions command can also be used to set default behaviour of the
printer. The following command makes the documents always be printed in both
sides of the sheet::
$ lpoptions -o sides=two-sided-long-edge
Set Default Printer in Cups Client
Cups in NetBSD
pkgsrc/print/ghostscript package. Be sure that you enable the
cups option when compiling::
cd /usr/bin and rename all
lp*_ This will prevent
the system for using standard
lp*. Notice that
to be in your
lp* are there). Another solution is
to take off execution permission from them.
cp /usr/pkg/share/examples/rc.d/cupsd /etc/rc.d
cat cupsd=YES >> /etc/rc.conf
7. Open the browser and type at the address bar:
"Error - no default destination available"
Whenever the following error from lp* executables appear:
"Error - no default destination available."
Set a default printer in CUPS. You can set a default printer using the lpoptions command line program, too.
Printing in both sides of the sheet
If the printer supports printing in both sides of the sheet, just pass the -o sides=two-sided-long-edge option two lpr::
$ lpr -P printer_name -o sides=two-sided-long-edge file
The two-sided-short-edge is recommended for landscape pages.
(linux-br) Imprimir frente e verso
Error "pending since ..."
Your CUPS stopped to print and job status tell you obscure stuff like "pending since ..."?
I just changed the driver (choose a generic one) and it works now.
Later, I discovered that the printer can be "Paused" (with no reason!). Open CUPS administration tool in your web browser with http://localhost:631/ and go to the "Printers" tab. Select your printer. In the "Maintenance" combo box, see if there is a "Resume printer" option. Click it.
Unsupported format 'application/vnd.cups-banner'! when printing test page
If you just added a new printer and got this error when trying to print a test
page, it is probably more complex than it seems. In my case,
program, that is usually installed with ghostscript, was lacking in my system.
What I had to do is to recompile ghostcript from pkgsrc_ with cups support.