SLAC ESD Software Engineering Group





SLAC Detailed

SLAC Computing

Software Home

Software Detailed

Documentation and Web Support


         Modified: 09-Apr-2013


We are using CUPS print services on our LCLS/LCLS2/FACET servers.  On the private network we configure the print queues on mccfs8 and on the public network we use lcls-prod01.  The other servers on the networks use the /etc/cups/client.conf file (which points to the print server).

On the LCLSCA, LCLS2 and FACETCA network the print server is mccfs8.  The DMZ servers will point to lcls-prod01. 

Cupsd daemon runs on the print server. On Print Clients (example lcls-builder), CUPS need to be installed but there is no need of running cupsd daemon/process on print clients. The CUPS clients are easy to set up and the config is identical on all machines. On CUPS client the important file is /etc/cups/client.conf.  This file gets updated in production by rsync mechanism (

On lcls-builder (CUPS Client), /etc/cups/client.conf contains only one line pointing to CUPS Print Server mccfs8.


[divekar@lcls-builder cups]$ cat client.conf





To add or remove queues on lcls-prod01 or mccfs8 run  'system-config-printers' as root.  If you add a new printer make sure that the printer is "shared" so the other servers will be able to use the new printer.



Configuring Server  (CUPS Link)


You must enable printer sharing on the server before clients can print through it. The simplest way to do this is to use the cupsctl(8) command on the server:

cupsctl --share-printers

By default, the above command will allow printing from other clients on the same subnet as your server. To allow printing from any subnet, use the following command instead:

cupsctl --share-printers --remote-any

Next, you need to choose which protocols to use for printer sharing. The default is CUPS browsing and DNS-SD on Mac OS X and CUPS browsing alone on other platforms. To set the sharing protocols, run the cupsctl command to set theBrowseLocalProtocolsvalue. For example, run the following command to allow shared printing via CUPS, DNS-SD, LPD, and SMB:

cupsctl 'BrowseLocalProtocols="cups dnssd lpd smb"'


Physics-elog has a special /etc/cups/printers.conf file for the physics elog.  Refer to:   Add a new logbook procedure


*DO NOT RUN  system-config-printers on physics-elog, unless you know what you are doing, as it will corrupt the physics-elog printers.conf file


Some commands to help troubleshoot CUPS:


lpstat -R Shows the ranking of print jobs.
lpstat -a Shows the accepting state of printer queues. If no printers are specified then all printers are listed.
lpstat -r Shows whether or not the CUPS server is running
lpstat -p Shows the printers and whether or not they are enabled for printing.
service cups restart Restart the CUPS service
service cups status Shows the status of the CUPS service


Important files used by CUPS

/etc/cups/printers.conf Defines local printers that are available ( lcls-prod01, mccfs8, and physics-elog have non-default printers.conf)
/etc/printcap Gets created when CUPS is started.  All print queues that are available are listed here
/etc/cups/cups.conf CUPS configuration file -no need to change this file
/etc/cups/client.conf CUPS client file which points to print server



Building a Public Server:

When building a public server that will use CUPS remember to add "nolprng" to the taylor.opts file BEFORE running taylor.  If taylor is run without the "nolprng" qualifier then you will have to change the following symbolic links:

To see the lprng settings:


/u/cd/brobeck:> ls -la /usr/bin/* | grep lprng
lrwxrwxrwx 1 root root 27 Sep 19 2006 /usr/bin/cancel -> /var/spool/lprng/bin/cancel*
lrwxrwxrwx 1 root root 23 Sep 19 2006 /usr/bin/lp -> /var/spool/lprng/bin/lp*
lrwxrwxrwx 1 root root 25 Sep 19 2006 /usr/bin/lpc -> /var/spool/lprng/sbin/lpc*
lrwxrwxrwx 1 root root 24 Sep 19 2006 /usr/bin/lpq -> /var/spool/lprng/bin/lpq*
lrwxrwxrwx 1 root root 24 Sep 19 2006 /usr/bin/lpr -> /var/spool/lprng/bin/lpr*
lrwxrwxrwx 1 root root 25 Sep 19 2006 /usr/bin/lprm -> /var/spool/lprng/bin/lprm*
lrwxrwxrwx 1 root root 27 Sep 19 2006 /usr/bin/lpstat -> /var/spool/lprng/bin/lpstat*

To change to CUPS AFTER tayler had run:

  1. add nolprng to the taylor.opts
  2. perform 'rm' command and then 'ln -s'
    1. /usr/bin:# ls -la /usr/bin/* | grep altern
      lrwxrwxrwx 1 root root 30 Jul 25 08:59 /usr/bin/cancel -> /etc/alternatives/print-cancel*
      lrwxrwxrwx 1 root root 26 Jul 25 08:59 /usr/bin/lp -> /etc/alternatives/print-lp*
      lrwxrwxrwx 1 root root 27 Jul 25 08:59 /usr/bin/lpq -> /etc/alternatives/print-lpq*
      lrwxrwxrwx 1 root root 23 Jul 25 09:01 /usr/bin/lpr -> /etc/alternatives/print*
      lrwxrwxrwx 1 root root 28 Jul 25 09:00 /usr/bin/lprm -> /etc/alternatives/print-lprm*
      lrwxrwxrwx 1 root root 30 Jul 25 08:57 /usr/bin/lpstat -> /etc/alternatives/print-lpstat*
      lrwxrwxrwx 1 root root 23 Jul 25 08:58 /usr/bin/print -> /etc/alternatives/print*






Created by Ken Brobeck on Feb 25 2008.

Modified: 09-Apr-2013