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:
ServerName print.phas.ubc.ca
sudo service cups restart
If you have a local printer, here is how you can add the department printers under Ubuntu system:
- Open Printers
- Click on Add button
- Choose LPD/LPR Host or Printer, with Host: print.phas.ubc.ca Queue: lp
**Note: lp is the print queue name, here are all the department printers' print queue name on print server:
lp: woodie.phas.ubc.ca in Hennings 203 (HP Color LaserJet M652)
lp3: treekillah.phas.ubc.ca in Hennings 325 (HP Color LaserJet M652)
lp7: chippy.phas.ubc.ca in Hennings 310 (HP Color LaserJet M652)
ColourCopier: Xerox copier in Hennings 325 (Xerox WorkCentre 7855)
QMI-HP: qmi-hp652.phas.ubc.ca in Ampel 170 (HP Color LaserJet M652) - 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.
- Click on Forward, on Installable Options page, Tray 3 select HP 550-Sheet Input Tray
- Click on Forward, on Describe Printer page:
Printer Name: lp
Description: woodie
Location: Henn 203 - 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.
- 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 }
- Saving the print job in the spool directory:
- Saving the information for the spooler and the filter in /var/spool/cups/c
- Saving the data from the files to print in /var/spool/cups/d
- Filtering of the print data and sending the printer-specific data to the printer:
- Starting the filter system:
- Determining which filters are needed for generating the printer-specific data and establishment of the so called "filter chain" or "filter pipe".
- Starting the programs of the filter chain with suitable parameters.
- Starting the backend for sending the printer-specific data from the filter pipe to the printer.
- Starting the filter system:
- Completing the print job:
- Waiting until the backend is finished.
- 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:
- Stop and deactivate cupsd.
- In /etc/cups/client.conf, insert the following lines:
ServerName print.phas.ubc.ca 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.