Printers - Linux Configuration

Printing to Departmental Printers from Linux Computers

If you DO NOT have a local printer, here is how you setup:

sudo vi /etc/cups/client.conf

# make sure you have the following line in client.conf file:


sudo service cups restart

If you have a local printer, here is how you can add the department printers under Ubuntu system:

  1. Open Printers
  2. Click on Add button
  3. Choose LPD/LPR Host or Printer, with Host: Queue: lp
    **Note: lp is the print queue name, here are all the department printers' print queue name on print server:
    lp: in Hennings 203 (HP Color LaserJet M652)
    lp3: in Hennings 325 (HP Color LaserJet M652)
    lp7: in Hennings 310 (HP Color LaserJet M652)
    ColourCopier:  Xerox copier in Hennings 325 (Xerox WorkCentre 7855)
    QMI-HP: in Ampel 170 (HP Color LaserJet M652)
  4. Click on Forward to choose driver based on printer's model above, if the model is not listed, then you need to download the driver first: right click on HP M652 Driver and then click Save link as... to save the driver PPD, then select Provide PPD file and provide the PPD file you just downloaded.
  5. Click on Forward, on Installable Options page, Tray 3 select HP 550-Sheet Input Tray
  6. Click on Forward, on Describe Printer page:
    Printer Name: lp
    Description: woodie
    Location: Henn 203
  7. Click on Apply, when asked, print a test page to make sure it's working

Overview of the CUPS Printing System

More information is available at the CUPS home page.

Processing stages of a print job:

This step takes place both on client and on server systems. This is the only step on clients. No queues exist on clients.

  1. A command-line tool or an application generates a print job and passes it to the spooler.

    Applications start a command-line tool (e.g., Mozilla) or use the CUPS library functions directly (e.g., kprinter). A print job consists of information for the spooler, the print data, and optional information for the filter.

    Example for a command-line tool:

    lp -d queue -t title -o option1=value1 -o option2=value2 file1 file2

    "queue" and "title" are information for the spooler. "option1=value1" and "option2=value2" are information for the filter. "file1" and "file2" are the print data.

    The following steps only take place on a CUPS server. A host on which the following steps take place is a server. A host on which a queue exists is a server.

    The spooler (cupsd) does:

    OL.withroman { list-style-type: lower-roman } OL.withabc { list-style-type: lower-alpha }

  2. Saving the print job in the spool directory:
    1. Saving the information for the spooler and the filter in /var/spool/cups/c
    2. Saving the data from the files to print in /var/spool/cups/d
  3. Filtering of the print data and sending the printer-specific data to the printer:
    1. Starting the filter system:
      1. Determining which filters are needed for generating the printer-specific data and establishment of the so called "filter chain" or "filter pipe".
      2. Starting the programs of the filter chain with suitable parameters.
    2. Starting the backend for sending the printer-specific data from the filter pipe to the printer.
  4. Completing the print job:
    1. Waiting until the backend is finished.
    2. Deleting the respective files from the spool directory.

Client-only configuration:

If browsing is generally undesired, there is no reason for running a cupsd on the client. In this case, a client-only configuration should be set up. This can be done as follows:

  1. Stop and deactivate cupsd.
  2. In /etc/cups/client.conf, insert the following lines:

    ServerName Encryption IfRequested

This kind of entry should not exist together with a running local cupsd. As only one entry is possible, the preferred server should be entered. To access a different server, the server must be specified explicitly (option "-h") when using the command-line tools, or the environment variable CUPS_SERVER must be set accordingly. Some applications ignore the "ServerName" entry. In this case, it may be useful to set CUPS_SERVER, or the server can be specified explicitly in the application (e.g., with the option "-h" in the print command).

Stopping cupsd From Running on Startup

Ubuntu - Stop cupsd:

sudo /etc/init.d/cups stop

Ubuntu - Stop cupsd from running on startup:

sudo update-rc.d cups disable

Redhat - Stop cups:

service cups stop

Redhat - Stop cups from running on startup:

sudo chkconfig cups off

Minimal client installations:

The standard minimum requirement for addressing CUPS servers is to install the "cups-libs" and "cups-client" packages. In this case, servers can be addressed with the command-line tools.

The absolute minimum requirement for addressing a CUPS server is to install only the "cups-libs" package. In this case, only programs that use the CUPS libraries directly (e.g., kprinter) can be used.

Firewall settings: Note that port 631 TCP and UDP must be allowed in firewall settings.

Source URL: