Friday, May 30, 2008

Actually getting lpr to work with cups

Yes, it should 'just work', but it doesn't. After installing cupsys-bsd to provide lpr, you also have to set the printer's name in your environment.

After setting up the printer in cups, list out the printer's names like this:


bash$ lpadmin -p
printer PDF is idle. enabled since Fri 25 Apr 2008 02:37:51 PM CDT
printer Savin is idle. enabled since Tue 20 Nov 2007 06:03:36 PM CST


Then pick the one you want and set the environment variable PRINTER:


export PRINTER=Savin


Now you can use lpq:


bash$ lpq
Savin is ready
no entries


As a follow up, you can also use the '-P' switch like this:

lpq -P Savin
Savin is ready
no entries

No comments: