Today's Page Hits: 237
This page validates as XHTML 1.0, and will look much better in a browser that supports web standards, but it is accessible to any browser or Internet device. It was created using techniques detailed at glish.com/css/.
Using CUPS Print Server for Solaris 10
Life is too short for bad printer software
Ever used lpadmin? It's a big pain—command line oriented with little error checking. It's hard to use and has many options to get you into trouble.
That's why I prefer CUPS, Common UNIX Printing System, which is used mostly on Linux and has
web-based menus. The CUPS menus only present relevant options and have extensive error checking.
The tutorial below shows how to use CUPS to access one network printer from Solaris 10. The network printer I use happens to be a IOGEAR USB Print Server attached to my local home network and a EPSON STYLUS COLOR C86 printer. This print server works with the LPD protocol (for Linux/Solaris) and MS Windows printing protocols.
Installing CUPS is available from the "Software Companion" CD (along with all the other SFW* open-source packages). You want package SFWcups, and probably SFWcprnt, which also bundles packages SFWespgs, SFWhpijs, SFWxpp, SFWgprnt). Pre-compiled CUPS packages are available elsewhere, such as sunfreeware.com
Disabling Solaris lp* commands (optional) To avoid confusion, I recommend disabling Solaris lp* commands. Applications typically use /usr/bin/lp to print and it's easy to forget to reconfigure. I recommend renaming the old commands and linking to the CUPS commands. Here's a sample shell script to do this:
#! /bin/sh cd /usr/bin for i in lp lpstat cancel enable ; do mv $i $i.old ln -s /opt/sfw/cups/bin/$i . done cd /usr/sbin for i in lpadmin lpmove accept ; do mv $i $i.old ln -s /opt/sfw/cups/sbin/$i . done
Enabling CUPS Add /opt/sfw/cups/bin to the PATH of each user, in front of /usr/bin. Also add /opt/sfw/cups/sbin to the PATH of each print administrator, in front of /usr/sbin. Enable the CUPS daemon, cupsd, with this shell script:
#! /bin/sh cp /opt/sfw/cups/etc/init.d/cups /etc/init.d for i in rc0.d rc1.d rcS.d ; do ln /etc/init.d/cups /etc/$i/K00cups done for i in rc2.d rc3.d ; do ln /etc/init.d/cups /etc/$i/S99cups done /etc/init.d/cups start /etc/init.d/cups statusNext, set the CUPS root password (saved in file /opt/sfw/cups/etc/cups/passwd.md5). This password may be the same or different from your UNIX root password. Set it with this command:
Initial CUPS setup To setup your first printer with CUPS, after starting cupsd agove, go to http://localhost:631/ Beware that if you access this URL remotely, transactions, including CUPS passwords, can be viewed over the network. This is why remote access disabled by default in cupsd.conf. Here's the steps I took to enable my network printer on server "adams" (defined in /etc/hosts) with network print queue "lp1":
Printer defaults The above steps sets the default printer. You may want to make sure the default is not easily overridden by setting the PRINTER and LPDEST environmental variables and setting up a $HOME/.printers file looking something like this:
_default lp1 _all lp1This step is the same for Solaris whether or not you use CUPS.
Removing old print server software (optional). To reduce errors and confusion, I removed the old printer software. You may want to wait until you're sure you want to use CUPS and not go back to the default Solaris printing tools and server. The packages can always be re-added from the install DVD. The softare package removal may be done with this script. Answer "y" to the prompts when running:
#! /bin/sh
for i in server cleanup rfc1179 ; do
svcadm disable print/$i
done
pkgrm SUNWscplp SUNWppm SUNWpsu SUNWpsr SUNWpcu SUNWpcr
This disables the old print services and removes these packages:
References
Posted at 11:51PM Nov 26, 2006 by DanX in Solaris | Comments[10]
Posted by John on December 09, 2006 at 06:03 PM PST #
Posted by Dan Anderson on December 16, 2006 at 12:01 AM PST #
Posted by TyskJohan on December 20, 2006 at 01:52 AM PST #
Posted by Keith Ketchmark on January 02, 2007 at 01:55 PM PST #
Posted by Dan Anderson on January 19, 2007 at 01:18 PM PST #
Posted by gerard on January 31, 2007 at 11:39 PM PST #
Posted by Dan Anderson on February 02, 2007 at 11:28 AM PST #
Keith, is native (non-CUPS) IPP client-side printing available in Solaris 10? I see reports that it is available in Solaris Express, but not 10. If not, are there plans for it to be in Solaris 10?
Posted by Ryan Lovett on February 15, 2007 at 09:55 AM PST #
Posted by Ryan Lovett on February 15, 2007 at 11:26 AM PST #
OpenSolaris Printing Community
Solaris IPP BigAdmin article
Posted by Dan Anderson on February 20, 2007 at 03:29 PM PST #