Norm Jacobs's Weblog From the chipper...

Friday Oct 09, 2009

About a year and a half ago I blogged about CUPS being available in build 87 and later of OpenSolaris.  A couple of weeks ago Ghee blogged about How to turn on CUPS on OpenSolaris.  I thought that I would recap and add a little to the discussions.

First, installing and enabling CUPS on OpenSolaris

opensolaris% pfexec pkg install SUNWhal-cups-utils
opensolaris% pfexec svccfg import /var/svc/manifest/application/cups.xml
opensolaris% pfexec /usr/sbin/print-service -s cups

Once you have CUPS running on your system, you can start to configure it using the GUI print management tool that comes with the OpenSolaris Desktop.  The tool is launched via the Desktop menus by selecting "System" -> "Administration" -> "Print Manager".  An example follows:


When you use the management application to perform a privileged action (like creating a new print queue, modifying print queue properties, or deleting an existing print queue), you will prompted for the "root" password.

Once you have authenticated, the action will be performed.  Before you ask, yes this needs to be better integrated with RBAC.

If you have forgotten the root password that you set when you installed the system, you can login using the account that you created during installation and from a shell execute:

opensolaris% pfexec passwd root

This will prompt you to set a new root password.  The reason this works is because the initial account is given the "root" role when it's created.  Note that this only works for accounts with the "root" role.

CUPS also has a web based management interface that you can access via http://localhost:631/admin/.  The web interface provides similar functionality to the desktop GUI, but the desktop GUI is also integrated with USB hotplug support, so when you plug in a USB printer, it should automatically create a queue for you and offer you the opportunity to modify it's configuration via a notification area notice on your desktop.

If you have problems printing to your USB attached printer using the CUPS built in "usb" backend you can also try the "hal" backend supplied as part of hal-cups-utils.  To switch, you need to bring up the properties sheet by right-clicking the printer icon.


The properties sheet should look something like this

Note that the "Device URI" starts with "usb://".  This indicates that the CUPS usb backend module is configured to communicate with the printer.  To change backend modules, you can press the "Change..." button.  A dialog will popup allowing you to select from discovered devices.


 At this point you can select the device that matches your printer and press "Apply"


The properties sheet will change to reflect the new "Device URI" for the printer.


Notice that the "Device URI" now starts with "hal:///".  This indicates that the HAL backend module supplied by hal-cups-utils will be used to communicate with the printer.


Friday May 11, 2007

Since this is been an area that I have wanted to address for several years now, I thought it was as good a place as any to start blogging...

Over the last several years we have been working to improve the printing experience on Solaris.

Since Solaris 2.0, printing has been a on or near the top of the dissatisfiers for users of Solaris. Over the various releases, we have made architectural changes, added features, and made advancements to ease the most common complaint...configuring the service. We have created GUI tools to hide complexity, we have made client support name service aware, we have added open source driver support, ...

While we have made changes to ease the burden of printing management, a while back, we came to the realization that it's still too difficult. Why? Well, the tools are too dificult to locate and often they require specialized knowledge to create a print queue or access one on a remote system.

A few months ago, I proposed project Presto on opensolaris-discuss@opensolaris.org. Presto is intended to take print service management to the next level. It is intended to address local and network printer device discovery, automatic print queue configuration, network print queue advertising and network print queue discovery.

We are nearing that next stage of evolution. The Solaris Printing team and the Desktop team have been moving forward to achieve the objectives of Presto. With the help of Artem Kachitchkin from the Tamarack team, I integrated the first piece of infrastructure to handle USB printer detection inside of HAL in Solaris Nevada build 53. Since then, several improvements and bug fixes have been made to the print service, HAL, and devfsadmd in order to pave the way for additional Presto support.

We have reached a point where we have a working prototype of part of the functionality. This includes a desktop component using the HAL support to automatically create print queues. It also includes and SMF service that provides print queue discovery support which is compatible with Linux/CUPS and MaxOS X print queue advertisements. While the prototype is a very small subset of what we ultimately hope Presto to cover, it's at a point where the functionality has become somewhat useful.

Improvements to the desktop applet, network printer device discovery and network print queue advertisements are in the works.

At any rate... watch the movie..., download the bits, play with them, join the fun, and let us know what you think at presto-discuss@opensolaris.org. Constructive comments are always welcome, if not encouraged.

-Norm