Configuring and Managing Print Services


Your task as a system administrator (or root operator of your workstation) is to properly define local or remote printers and to ensure that printing services are enabled and running properly. Fortunately, Ubuntu includes GNOME graphical print service configuration tools that make this job easy. You should use these tools to configure printing, as you learn in this section of the chapter. But first, take a moment to read through a quick overview of the configuration process.

Caution

Do not manually edit your /etc/printcap. Any changes are lost when the printing service is restarted or if your system is rebooted. If you need to create customized printer entries, save the entries in /etc/printcap.local and then restart the printing service.


You can configure printing services using the gnome-cups-manager graphical interface. Most of the detailed information in this chapter refers to the use of the GUI. The overview sections that follow, however, give you a solid foundation in both configuration approaches. You learn the details of these processes in later sections of the chapter.

GUI-Based Printer Configuration Quickstart

Configuring a printer for Ubuntu is easy but must be done using root permission. Make sure that the cupsd daemon is installed and running. If you elect to use printing support when you install Ubuntu, the daemon and related software will be installed. If you're not sure whether cupsd is running, you can use the service command with the name of the service and the status keyword, as follows:

$ /etc/init.d/cupsys status 


You will see either

Status of Common Unix Printing System: cupsd is not running. 


or, if cupsd is running, an acknowledgement, such as this:

Status of Common Unix Printing System: cupsd is running. 


If cupsd is installed but not running, start the daemon like so:

# /etc/init.d/cups start 


If you are using the desktop, select the Printing menu item from the System, Administration menu. You will be asked to enter the root password. If not, you are using X as root, which is a bad idea. Log out, and then log back in as a regular user! After entering the root password, the Printer Configuration dialog appears.

You then simply follow the prompts to define your printer and add local or remote printing services. You should print a test page before saving your changes. Use the printer configuration client or the File menu's Print menu item from a GNOME or KDE client.

Managing Printing Services

After defining a printer, you can use the command line to view and control your print jobs, or if root, all print jobs and printers on your system.

Table 12.1 contains a partial list of CUPS and related printing commands and drivers included with Ubuntu.

Table 12.1. Print-Related Commands and Drivers

Name

Description

a2ps

Formats text files for PostScript printing

accept

Controls CUPS print job destinations

cancel

Cancels a CUPS print job

dvi[lj, lj4l, lj2p, lj4]

Converts TeX DVI files to specific PCL format

encscript

Converts text files to PostScript

escputil

Epson Stylus inkjet printer utility

grolbp

groff driver for Canon LBP-4 and LBP-8 laser printers

gs

The Ghostscript interpreter

gsbj[dj500, lp]

Ghostscript BubbleJet printer drivers

gsdj[dj500, lj, lp]

Ghostscript DeskJet printer drivers

lpadmin

CUPS command-line-based printer utility

lp

Starts a CUPS print job

lpc

A Berkeley-subset CUPS printer control client

lpf

General printer filter

lprm

A Berkeley-compatible CUPS job queue utility

lpstat

Displays CUPS print jobs and printer status

mpage

PostScript text formatting utility

pbm[2ppa, page, to10x, toepson, toppa, toptx]

Portable bitmap conversion utilities

pr

Text formatting command

psmandup

Duplex printing utility for nonduplex printers

reject

Controls CUPS print job destinations

setup

Launches printer configuration tool

smbclient

SMB print spooler

smbprint

SMB print shell script

smbspool

SMB printer spooler

thinkjettopbm

Portable bitmap to ThinkJet printer conversion utility


Most Linux systems use PostScript as the default document format for printing. Ubuntu uses the gs command along with CUPS to manage local and remote print jobs and the type of data transferred during a print job. The gs command is used to translate the document stream into a format accepted by the destination printer (which most likely uses HPCL).

You can use the Ghostscript interpreter gs to display its built-in printer devices by using the gs interpreter with its --help command-line option, as follows:

# gs --help 


Note

Ubuntu includes graphical clients you can use to view many different types of documents. For example, to display PostScript documents (including compressed PostScript documents) or PostScript images, use the gv client. To display Portable Document Format (PDF) documents, you can use gv or the xpdf client.


The gs command outputs many lines of help text on command-line usage and then lists built-in printer and graphics devices. Another way to get this information is to start gs and then use the devicenames == command like this:

# gs GNU Ghostscript 7.05 (2002-04-22) Copyright (C) 2002 artofcode LLC, Benicia, CA.  All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. [/declj250 /mgr8 /lj4dithp /cdj890 /dfaxlow /lex2050\  /bjccmyk /bmpmono /iwlq /appledmp /bmp16m /hpdj690c\  /tifflzw /hpdj500 /psrgb /fmpr /pksm /epl5800 /pcx2up\  /deskjet /mgrgray2 /lj5gray /cdj970 /epswrite /lex3200\  /bjccolor /bmpsep1 /jetp3852 /atx23 /bmp256 /hpdj850c /tiffpack /hpdj500c /pswrite /fs600\  /pksmraw /epl5900 /pcxcmyk /dj505j /mgrgray4 /lj5mono\ ... 


Not all the devices are listed in this example.

Aladdin or GNU?

At least two versions of Ghostscript are available for Linux. One version is named AFPL Ghostscript, which formerly went by the name Aladdin Ghostscript. This version is licensed under the Aladdin Free Public License, which disallows commercial distribution. The other version is called GNU Ghostscript, which is distributed under the GNU General Public License. For details about the different versions or for answers to questions regarding licensing, see the Ghostscript home page at http://www.cs.wisc.edu/~ghost/.




Ubuntu Unleashed
Ubuntu Unleashed 2011 Edition: Covering 10.10 and 11.04 (6th Edition)
ISBN: 0672333449
EAN: 2147483647
Year: 2006
Pages: 318

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net