Print over remote CUPS server, but just show a subset of the printers

I'd like to print from my Ubuntu laptop (karmic) to some networked printers. Our organisation uses a CUPS server with several hundred printers. What I know I can do is:

CUPS_SERVER=printers.company.com acroread document.pdf

and then Adobe Reader shows me all available printers to select from. However, it takes a couple of minutes to display the large list, which is really annoying. (The desktop PCs here suffer from this, too.)

The other option is to add a new printer with an address like

ipp://printers.company.com/printer/bldg1_hp8150

(to the Ubuntu printer configuration = local CUPS server). However, it asks me for a driver. I don't want to / can't always specify a driver, since some printers don't appear in the list. I'd like to let the remote CUPS server handle the driver part (like it does when i set CUPS_SERVER), and do no more preprocessing/"driver stuff" on my side.

The ideal thing would be if I could somehow add the remote printer list to my local cups server, and apply a filter, so that it would just display printers a la bldg1_*. This feature was available in KDE3.?, but I can't find something similar in Ubuntu/Gnome. Any suggestions?


Well, there are two things I can think of.

Go to http://localhost:631/admin/ and check the "Show printers shared by other systems" box. Then, when you're connected to their network, you'll automagically see all the printers.

Kind of nice.

The other option would be to manually add the printers to cups. You can add them from the command line, so it's not as painful as you may think, you can even add them as a one-liner.

To add one printer, and enable it for use, run these commands:

lpadmin -p itcolor -v ipp://printserver/printers/itcolor

cupsenable itcolor

cupsaccept itcolor

Lets say, you wanted to add all the printers on server printserver.company.com that are accepting jobs, and who's names start with marketing.

for each in $(lpstat -h printserver.company.com:631 -a | grep "accepting" | grep -E "^marketing" | cut -d " " -f 1)
do lpadmin -p $each -v ipp://printserver.company.com/printers/$each
cupsenable $each
cupsaccept $each
done