Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Managing multiple printers via the command line' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Managing multiple printers via the command line
Authored by: ocdinsomniac on Dec 07, '06 10:00:04AM

This is a great hint. Thanks!

Coincidentally, I recently had the need to add and remove printers to a lab full of Macs. I sure wish I'd known about these commands. But I thought I'd share my method, which is completely different, but which also works well, and is pretty easy.

1. Set up one system with all printers, exactly as you'll want them on the other machines.
2. Copy the entire /etc/cups folder to the other machines.
3. Restart the cups daemon (as root): killall -HUP cupsd
4. (Optional) If you have network users, restart Directory Services (as root): killall DirectoryService

That should do it.

Also, the command I use to kill all print jobs is: cancel -a -


[ Reply to This | # ]
Managing multiple printers via the command line
Authored by: mbd on Dec 07, '06 02:27:01PM
If you're using a whole lab of machines, you may want to try and use scripting to configure the machine's printers. I found this set of scripts a while ago and modified it as needed for our environment. I can now configure any number macs' printer configurations on the fly without difficulty. Additionally, in regards to clearing printer queues, the way I do that to be 100% sure that it's really going to do it is to add a LoginHook to each machine so that every time a user logs in, the following script is run, which clears out the CUPS server's queues and restarts it. Works brilliantly, and haven't had a report of a blocked print queue on a mac since :-).

# --cut--
rm -fr /var/spool/cups
mkdir /var/spool/cups
mkdir /var/spool/cups/tmp
chmod 710 /var/spool/cups
chmod 1770 /var/spool/cups/tmp
chown -R root:lp /var/spool/cups
killall -HUP cupsd
# --cut--

[ Reply to This | # ]