Five Cool Things to do with CUPS

—by Joel Rennich, mactroll@afp548.com

5 September 2002

(1) Group printers together

Set up two or more printers in the Print Center just like normal. Turn on Printer Sharing in the Sharing system Preference Pane. Open up a browser and go to http://127.0.0.1:631. This will take you to the CUPS administration interface. Select “Add Class.” Create a new class and add the printers that you need to it. Next, go to Server Settings and share out the new class that you created. It will show up in the Print Center as an available queue. Wow—you can now shut down that ASIP print server.

(2) Print to Windows printers

This functionality is already included Jaguar, but you need to help it along a bit. First off, drop down to the command line and run these two commands:

cd /usr/libexec/cups/backend/
sudo ln -s /usr/bin/smbspool smb

Now start up printer sharing from the Sharing Preference Pane. If you have already started it, you need to turn it off and then on again for CUPS to pick up the changes. Go back to the CUPS web interface at http://127.0.0.1:631. Select “Add Printer.” Give it a name, a location, and a description. In the next screen, pull down the menu to “Windows printer via SAMBA.” Now add in the URI. The format is as follows:

smb://user:pass@workgroup/server/sharename

Pick a printer make and model. Don’t worry if you can’t find something that matches, you can fix this later. Finish up the printer addition and then cruise on over to the Print Center. Your newly created Windows printer queue will be here. Now you can show info on the queue and select a better PPD if you need to.

Like the previous tip, once you have the printer in Print Center you can open up Server Settings and share this queue out over AppleTalk or any other way, even back to Windows if you want to make things complicated.

(3) Share a local non-PostScript printer to Mac OS X 10.2 clients

This one is so simple that you won’t believe it. It doesn’t need Server—any version of Mac OS X 10.2 will do. Set up your non-PostScript printer on the local machine. Make sure that it shows up in Print Center. Enable printer sharing in the Sharing Preference Pane. Step three?there is no step three. The printer will now show up, by way of Rendezvous, to all Mac OS X 10.2 machines on your local network. They don’t even need to be added, they’ll just be there in the list, with a light pink background.

(4) Print to a non-PostScript HP printer connected to an HP print server

This may work with third party printers and with HP compatible print servers. Try it and see. The problem here is that Mac OS 9 machines will see the printer. You can use the HP Utility and find it over AppleTalk. You can then setup the driver in the chooser. Mac OS X machines won’t be able to find these printers on their own. Make sure Printer Sharing is on and go to the CUPS web interface at http://127.0.0.1:631. Add a new printer. Give it a name, location and description. In the pull-down menu that follows, select “AppSocket/HP JetDirect.” Now you need to put in the URI. The format is as follows:

socket://<IP Address>:port

Use port 9100 for port 1 on the back of the print server, 9101 for port 2 and 9102 for port three. Now pick the PPD from CUPS that best matches your printer. It will show up in the Print Center. You will not be able to share this queue out, though, since the system knows that it isn’t a PostScript printer.

(5) Add a CUPS printer without going to the Web interface

Now that you have the hang of setting up these new printers, you can actually do some of them from Print Center itself without having to open up the web interface. Hold down the Option key when adding the printer in the Print Center and you will get an advanced option at the bottom of the pull-down. Here you can add your printers by the URIs like we have been using in the previous tips.

Happy printing!