System Administration Guide: Solaris Printing
Previous Next

Overview of Automatic Printer Discovery and Configuration

Automatic printing configuration is a mechanism that provides a hands-off method for administering printing in the GNOME Desktop Environment. This feature automates printer discovery and queue creation for directly attached USB printers.

Capabilities include the following:

  • Passive and active printer discovery

  • Desktop notification of local printing events

  • Ability to provide device information

  • Ability to query and display information about discovered printers

How Automatic Printer Discovery Works

Printer discovery is accomplished through the Hardware Abstraction Layer (HAL) device registry (database) component. HAL uses D-BUS messaging to notify interested applications about changes to its registry. D-BUS is a messaging bus that passes messages between applications and broadcasts signals that interested applications are able to detect. This messaging service is used by HAL and a number of other applications. HAL provides the framework for device discovery and notification of device configuration changes on a system. In the Solaris release, this support has been extended to detecting printers that are added or removed from a local system.

The HAL daemon, hald, provides a view of devices that are attached to a local system. This view is updated automatically, as a system's hardware configuration changes, by hotplugging or by other methods. HAL's internal database, also called the HAL device tree, is where device information is stored and maintained. HAL devices are uniquely identified in the HAL database through a Universal Device Identifier (UDI). This database is populated with properties of each device in the HAL database.

The automatic printing configuration feature works with the HAL daemon by listening for sysevents. When a hotplug-capable printer is added to a system, HAL creates a new node in the HAL device tree, as shown in the following example:

/org/freedesktop/Hal/devices/pci_0_0/pci1022_74606/pci108e_534d_3_1/printer_2_0_if0/print

When the device node has been successfully registered in the HAL database, HAL signals interested applications that the device is available. Device removal works similarly.

For more information about HAL, see http://opensolaris.org/os/project/tamarack/.

GNOME Desktop Notifications for Automatic Printer Discovery

The GNOME Desktop includes a notification dialog that is displayed when newly discovered printers has been successfully configured. This notification lets you know the printer is online and ready to print. The notification dialog is displayed on the lower right side of the GNOME Desktop. Note that if a previously configured printer is disconnected, powered off, or removed from the network, a similar notification dialog is displayed. Every time you connect or disconnect a local printer, or add or remove a network printer from the system, a notification dialog is displayed.


Note - The notification dialog is displayed whether a locally attached printer is connected or disconnected, or if the printer is powered on or off.


Previous Next