Sept. 23, 2009, 12:12 p.m.
posted by void
Set Up Your Printer
Get that printer connected, up, and running with Ubuntu. Ubuntu uses CUPS, the Common Unix Printing System, to manage printers and print queues. CUPS can be configured using a variety of tools, including the GNOME CUPS Manager and its own built-in web interface that runs on port 631. GNOME CUPS ManagerTo launch
GNOME CUPS Manager, select System GNOME CUPS Manager
Double-click the New Printer icon to open the "Add a Printer" window. Here, you need to specify whether your printer is connected directly to your computer or is on your network (see Figure). If your printer is connected by USB, it's a good idea to use the instructions in "Mount Removable Devices with Persistent Names" [Hack #83]">Figure). If your printer is connected by USB, it's a good idea to use the instructions in "Mount Removable Devices with Persistent Names" [Hack #83] to assign a permanent name to your printer before going any further; otherwise, it will probably be assigned a different bus ID every time you plug it in, and you will be asked to configure it again each time! Specifying local or network printer
If your printer is connected via the network, you will need to specify the protocol: IPP (Internet Printing Protocol), SMB (Windows printer sharing), LPD (Line Printer Daemon), or HP JetDirect. Each of those protocols in turn provides a number of configuration options to specify the printer identity. In Figure, the printer is connected to the second port on a network print server using IPP. Configuring a network printer
Specify the printer manufacturer and then select the model from the provided list, as shown in Figure. Selecting a printer model
If your printer model isn't included in the list, you can try using one of the drivers listed under the Generic manufacturer, or, if it's a PostScript printer, you can load the manufacturer's supplied PPD (PostScript Printer Description) file using the Install Driver button. Apply the changes, and you'll return to the list of installed printers with your new printer listed, as shown in Figure. Printer added
CUPS Web InterfaceGNOME CUPS Manager provides quick access to basic options, but to really take control of CUPS, you should use the built-in web-management interface. Open your web browser and point it at http://localhost:631 to see a huge range of options. Share Local PrintersYou can allow other computers on your network to print to your locally connected printer by setting the Shared option. Open /etc/cups/printers.conf in a text editor to see the definition for your printers. Each printer is defined in a separate block, with configuration options applied in any order inside the block, and you should see an existing configuration option of: Shared no Change this to: Shared yes After you make changes to printers.conf, restart the CUPS scheduler: $ sudo /etc/init.d/cupsys restart
Apply Print QuotasCUPS implements a very simple quota system that allows you to restrict page count over a specified period, but it can be applied only per printer and not per user. Open /etc/cups/printers.conf in a text editor and add two options: PageLimit, which is the page count limit, and QuotaPeriod, which is the period in seconds for which you want it enforced. To apply a limit of 200 pages per week, you could set those options to: QuotaPeriod 604800 PageLimit 200 One day is 86,400 seconds, a week is 604,800 seconds, and a month is 2,592,000 seconds. You can also apply a KLimit option, which is the amount of data in kilobytes that the printer is allowed to receive. This can be useful if you want to prevent people sending extremely large print jobs to specific printers.
One possible hack to get around the per-printer limitation of quota settings is to configure the same printer multiple times, each with a different name and access controls but all communicating with the same device. The quota for each "printer" will then be tracked and enforced individually, so you could have each user connecting to a different virtual printer to enforce individual quotas. |
- Comment
Printing, which will display a list of currently installed printers, shown in
