Ubuntu Printing

In building 32 all users who wish to print must be on the CSAILPrivate wireless network or wired CSAIL Ethernet. In building 45 printing is available wirelessly via MIT Secure or wired Ethernet configured on CSAIL subnet (mostly 6th and 7th floors).

CUPS Printing Tips For GNU/Linux & Unix

This page provides a brief introduction to using the CUPS printing system; full user documentation can be found at http://cups.csail.mit.edu:631/help/overview.html These instructions assume you are using a cups client for printing; if you are running CSAIL Ubuntu this is what you have.

For Non CSAIL Ubuntu Machines, see Non CSAIL Ubuntu Printer Setup

XFCE Printing Manager

XFCE is the default display environment for CSAIL Ubuntu, and includes an interface for accessing the CUPS server. You can access the Print manager via: XFCE Menu (the little white mouse head on blue circle icon in the upper left) Settings (along the right of the drop-down panel) Printers (in the left part of the panel; you’ll need to scroll down). From here, you can see all available printers, and set your default printer. To set the default, right click your closest printer, and select “Set As Default”. Following that, select the “Set as my personal default printer” radio button. The Printers window looks like the following:

xfce-print

Command Line options

CUPS allows you to access all of the printer features on the command line by specifying options in the form

-o <option>=<value>

multiple option specification are possible but each requires its own

-o

You can also save common settings as personal queue instances

Common Options

action syntax notes
duplex -o sides=two-sided-long-edge this is the default
simplex -o sides=one-sided
no banner -o job-sheets=none
print banner -o job-sheets=standard
N up printing -o number-up=<N> where N=[1,2,4,6,9,16]

More standard options are shown at in the online documentation on our CUPS server, but these are the most common.

Advanced Options

The above options are generic and can be applied to any printer that is spooled through CUPS. CUPS also supports printer specific options for things such as paper tray and print quality selection. The following command will list all available options for a specific pritner:

lpoptions -p <queue name> -l

The output of this command is in the following format

ShortOptionName/Long Option Name: value1 *value2 value3

Here value two (with the asterisk) is the default value, to change this to value3 for a specific print job the command would be:

lpr -Pqueue -o ShortOptionName=value3 file-to-print.ps

Saving Option Sets

Specifying 4 up simplex printing with no banner page from paper tray 2 in 1200dpi presentation quality mode can get awfully tedious. Thankfully you can save these options into a printer instance which takes the form <queue-name>/<instance-name> where <queue-name> is the printer you want to use and <instance-name> is a personal identifier for this option grouping. These opions are recorede in your ~/.lpoptions file. For example to record te previosly mentioned otions for the printer cabal in an instance called test you would look up the options using lpotions -p cabal -l as shown in the previous section and then use lpotions with the new queue/instance name and the selected options:

lpoptions -p cabal/test -o number-up=4 -o job-sheets=none -o InputSlot=Tray2 -o OutputMode=HiResPhoto -o sides=one-sided

Now anytime you print to <verbatim>lpr -Pcabal/test</verbatim> you will be invoking all those options. If you only specify a queue and don’t specify an instance these options will be your personal defaults for this printer. You can check which options have been changed from the system wide default by using lpoptions -p <queue-name>[/instance-name], for example:

lpoptions -p cabal/test
number-up=4 job-sheets=none InputSlot=Tray2 OutputMode=HiResPhoto sides=one-sided

lpoptions -p cabal
job-sheets=none,none page-bottom=18 page-left=18 page-right=18 page-top=18

PPD files for CSAIL printers

TIG maintains and supports a CSAIL specific distribution of Ubuntu. If you are using another distribution you may (or may not) find the following PPDs useful. Note however that other distributions are not supported by TIG.

Non-CSAIL Ubuntu Printer Setup

Accessing all (and only) CSAIL printers

If you have an Ubuntu (or Debian) machine that is not running CSAIL’s TIG-managed configuration of Ubuntu, and you want to use (all and only) TIG-managed CSAIL printers with it, you can do the following:

Create the file

/etc/cups/client.conf

Edit that file and add the line

ServerName cups.csail.mit.edu

and then run

sudo systemctl restart cups.service

Accessing particular CSAIL printers

If you have an Ubuntu (or Debian, or other CUPS-capable Linux or Unix) machine that you want to use one or a few CSAIL printers with, perhaps as well as one or a few other printers, you can run the following commands in a terminal for each CSAIL printer:

sudo lpadmin -p xerox0 -v ipp://cups.csail.mit.edu/printers/xerox0
sudo cupsenable xerox0
sudo cupsaccept xerox0

replacing xerox0 with the name of the printer you want to add, which you can find in the “Queue Name” column at http://cups.csail.mit.edu:631/printers. (You can omit sudo if you are in the lpadmin group.)

This approach is particularly useful, for instance, if you have a Linux laptop and need to print to printers both at CSAIL and at home. As always, the machine you’re printing from must already be on the CSAILPrivate network (or connected via wired Ethernet cable).