| Previous | Index | Next |
Chapter 10
Setting Up and Administering Printers by Using GNOME Desktop Tools (Tasks)
This chapter describes how to set up printers in the GNOME desktop that have been automatically discovered by the system.
This is a list of information in this chapter:
- Overview of Automatic Printer Discovery and Configuration
- GNOME Desktop Support for Directly Attached USB Printer Discovery
- GNOME Desktop Support for Network Attached Printer Discovery
- Administering the Network Device Discovery Service by Using SMF
- Setting Up Newly Discovered Printers in the GNOME Desktop Environment
- Modifying Printer Preferences in the GNOME Desktop Environment
- Obtaining Information About Discovered Printers
For information about how to set up printing services see Chapter 3, Setting Up Printing Services (Tasks).
For information about setting up printers, see Chapter 4, Setting Up Printers (Tasks)
For information about how to administer printers after you have set them up, see Chapter 5, Administering Printers by Using Solaris Print Manager and LP Print Commands (Tasks).
For overview information about printing services and printers, see Chapter 1, Introduction to Printing in the Solaris Operating System.
Setting Up Newly Discovered Printers in the GNOME Desktop Environment (Task Map)
Task |
|---|
Description |
For Information |
Initiate the HAL add-on module for network printer discovery. |
Before the system can actively scan the network for devices, you must first initiate the HAL add-on module for this feature. You can use GNOME desktop tools to enable this feature. |
How to Initiate the HAL Network Device Discovery Add-On Module in the GNOME Desktop Environment |
Initiate the HAL add-on module by using the Service Management Facility (SMF). |
You can initiate the HAL add-on module by using the svcadm command. Run this command to enable the network discovery services. |
How to Initiate the Network Device Discovery Services by Using SMF |
Administer the network discovery service by using SMF. |
You can stop, and refresh the network printer discovery service by using the svcadm command. |
Administering the Network Device Discovery Service by Using SMF |
Set up newly discovered printers in the GNOME Desktop Environment. |
When the system discovers a new directly attached or network attached printer, the system notifies that the device has been discovered. The Add Printer Queue dialog enables you to complete the printer setup and configuration. |
How to Add a Newly Discovered Printer in the GNOME Desktop Environment |
Modify default desktop printing notifications. |
You can modify the default behavior of desktop printing notifications in the GNOME Desktop Environment. |
How to Modify Printer Preferences and Notifications in the GNOME Desktop Environment |
Change default preferences for how documents are shown. |
You can modify the default preferences for how documents are shown in the GNOME Desktop Environment. |
How to Modify Printer Preferences for How Documents are Shown |
Obtain information about printers that are discovered by the system by using the command line. |
You can use the command line to obtain information about discovered printers. The output shows all of the devices that have been discovered by the system. |
How to Obtain Information about Discovered Printers by Using the Command Line |
Obtain additional information about discovered printers by using the command line. |
You can obtain additional details about discovered printers by using the command line. This information can be used for debugging purposes. |
How to Obtain Additional Details About Discovered Printers by Using the Command Line |
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.
GNOME Desktop Support for Directly Attached USB Printer Discovery
Desktop support for automatic printing configuration includes printer discovery, print queue configuration, and event notification. The discovery component has the ability to discover directly attached, hotplug-capable, USB printers. The configuration component automates the creation and configuration of print queues for directly attached printers. A notification component informs you of local print hotplug events, such as when a printer is connected to the system or removed from a system. See GNOME Desktop Notifications for Automatic Printer Discovery.
Note - In this Solaris release, network attached printer discovery is also available through a HAL add-on module that you can initiate from the command line or in the GNOME Desktop Environment. For more information, see GNOME Desktop Support for Network Attached Printer Discovery.
When the system detects a newly discovered directly attached USB printer, a new print queue is automatically created for the device. This action launches an Add Printer Queue application. Subsequently, a printer configuration dialog is displayed on the desktop. Note that the Add Printer Queue dialog is displayed for each newly discovered printer. Also, as printers are removed from a system, a similar notification is displayed, informing you that the device is no longer available.
For newly discovered printers, the following information is detected by the system and displayed in the Add Printer Queue dialog:
- Name
- Description
- Manufacturer
- Model
- Host
- Device
Although the process of print queue creation is automated, when the Add Printer Queue dialog is displayed, you need to complete the configuration process. This process includes verifying the preconfigured printer settings and optionally adding any customized printer information. Closing the window saves your changes and completes the print queue configuration process. See How to Add a Newly Discovered Printer in the GNOME Desktop Environment for more information.
GNOME Desktop Support for Network Attached Printer Discovery
Network attached printer support in the Solaris OS is designed and implemented through a HAL add-on module, /usr/lib/hal/hald-addon-network-discoveryAfter the printer has been discovered by the system, print queue configuration works the same way as it does for USB directly attached printers. See How Automatic Printer Discovery Works.
The network discovery components are standard service interfaces that are offered by classes of network attached devices. This module is capable of actively scanning a network for new devices. The service is directly controlled through the svcadm interface. For more information, see the man page. svcadm(1M). To determine the device type, an active scan is performed through a Simple Network Management Protocol version 1 (SNMPv1) broadcast. Be default, the SNMP based network attached printer discovery service probes the network for printers every 60 seconds. This property is configurable. See Modifying the Network Device Discovery Service Properties. During this active scan, SNMP determines the device type by attempting to connect to the device.
If the device is determined to be a printer, it is then probed by SNMP for the following properties:
- Manufacturer (mfg)
- Model (mdl)
- Description (desc)
- Serial number (serial)
Note - Only active device discovery is available in this Solaris OS. Passive device discovery through the Multicast DNS (mDNS) is not available.
Initiating the HAL Network Device Discovery Add-On Module
Network attached printer discovery is available through a HAL device discovery add-on module that you can initiate in GNOME Desktop Environment or from the command line. To utilize network printer discovery in a supported Solaris release, you must first initiate this add-on module. The process of printer discovery, print queue configuration, and event notification for newly discovered, network attached printers works much the same way as USB printer discovery, configuration, and event notification works. For task-related information, see Setting Up Newly Discovered Printers in the GNOME Desktop Environment.
Note - If you have an ECPP capable printer that is physically connected to the system when the HAL service is initiated, either by booting the system or by using the svcadm command, the printer will now be properly identified. This probe applies only to the startup of the HAL device discovery add-on module. If you add an ECPP capable printer to a running system, you must restart the service for the device to be discovered. Additional printer properties are then added to the ECPP port's HAL device tree entry.
For more information about the HAL device tree properties, see http://opensolaris.org/os/project/tamarack/.
How to Initiate the HAL Network Device Discovery Add-On Module in the GNOME Desktop Environment
The following procedure shows how to initiate the HAL network device discovery add-on module in the GNOME desktop. For information about how to initiate and manage the HAL network device discovery add-on module by using the Service Management Facility (SMF), see Administering the Network Device Discovery Service by Using SMF.
Note - If you are running the current Solaris release, you can also activate or deactivate the network printer discovery service through the Network tab of the Print Manager Preferences dialog in the GNOME desktop.
- From the GNOME Main Menu, select the Services application:
Main Menu -> Administration -> Services
Services settings window is displayed. - Initiate the HAL device discovery add-on module, by placing a checkmark in the check box next to the Hardware Abstraction Layer network attached device discovery (network/device-discovery/printers:snmp) option.
- Click OK, then close the window to save your changes.
To disable this feature, remove the checkmark from the check box and click OK.
Administering the Network Device Discovery Service by Using SMF
The HAL network device-discovery/printers service is controlled by SMF. You can enable, disable and refresh this service by using the svcadm command. For more information about using the svcadm command, see the svcadm(1M) man page.
How to Initiate the Network Device Discovery Services by Using SMF
This procedure describes how to initiate the network device-discovery/printers service (the HAL add-on module) by using the svcadm command. To initiate the HAL network discovery add-on module by using GNOME Desktop tools, see Initiating the HAL Network Device Discovery Add-On Module.
- Become superuser or assume an equivalent role.
- Determine whether the SMF device-discovery/printers service is online.
# **svcs device-discovery/printers**
If the service is online, the following output is displayed:
STATE STIME FMRI online 13:30:22 svc:/network/device-discovery/printers:snmp
If the service is offline, the following output is displayed:
STATE STIME FMRI disabled Dec_12 svc:/network/device-discovery/printers:snmp
- To enable the service instance, type the following command:
# **svcadm enable printers:snmp**
1* To enable the service temporarily, type the following command:
# **svcadm enable -t printers:snmp**
When the -t option is specified with the svcadm command, the service instance is temporarily enabled. The service is enabled only until the next system reboot. Note that to modify the restarter_actions property group of the service instances, you must be superuser or have solaris.smf.manage.discovery.printers.snmp authorization, which is part of the Printer Management profile. For more information, see the smf_restarter(5) man page. By default, the enable command, when used without additional options, is persistent across a system reboot.
- Verify that the HAL add-on module has been enabled.
# **svcs device-discovery/printers** STATE STIME FMRI online 13:30:22 svc:/network/device-discovery/printers:snmp
How to Initiate a Single Scan of the Network for Newly Discovered Devices
- Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. - To initiate a single scan of the network for newly discovered devices, type the following command:
# **svcadm refresh device-discovery**
If the service is enabled, or a scan has been successfully completed, the HAL device tree contains a complete list of all known printers that queues can be created for. For information about obtaining a list of all of the printers that have been discovered by the system, see How to Obtain Information about Discovered Printers by Using the Command Line.
- Verify that the device has been added to the HAL device tree. See How to Obtain Information about Discovered Printers by Using the Command Line.
How to Disable the SMF Network Device Discovery Service
- Become superuser or assume an equivalent role.
- To disable the network device-discovery/printers services, type the following command:
# **svcadm disable printers:snmp**
- Verify that the service is disabled:
# **svcs device-discovery/printers** STATE STIME FMRI disabled Dec_12 svc:/network/device-discovery/printers:snmp
For information about how to enable the service, see How to Initiate the Network Device Discovery Services by Using SMF.
See Also
To enable and disable the HAL network device discovery services by using printing tools in the GNOME Desktop Environment, see How to Initiate the HAL Network Device Discovery Add-On Module in the GNOME Desktop Environment.
Modifying the Network Device Discovery Service Properties
Use the svccfg command to add or modify the config/interval property of the svc:/network/device-discovery/printers:snmp service instance. This property can be modified to specify how often (in seconds) the system should scan the network for devices. For more information about using the svccfg command, see the svccfg(1M) man page.
For more information about the SMF properties that are associated with this service, see the smf(5) man page.
Example 10-1 Using the svccfg Command to Modify SMF Network Discovery Properties
This example shows how to change the config/interval property to scan the network for devices every 30 seconds.
# **svccfg** svc:> **select printers:snmp** svc:/network/device-discovery/printers:snmp> **setprop config/interval = integer: 30** svc:/network/device-discovery/printers:snmp> **quit**
Setting Up Newly Discovered Printers in the GNOME Desktop Environment
You do not need any special authorizations to set up a newly discovered, directly attached printer in the GNOME Desktop Environment by using automatic printing configuration tools. The Basic Solaris User profile has been modified to enable the console owner to add and configure local print queues. When you log in to your GNOME Desktop session, this profile is automatically assigned to you.
How to Add a Newly Discovered Printer in the GNOME Desktop Environment
This procedure describes how to set up and configure newly discovered directly attached or newly discovered network attached printers by using GNOME Desktop tools.
- On a system that is running a supported Solaris release, choose from the following options:
1* If you are adding a newly discovered directly attached USB printer, connect the printer to the system, then power on the printer.
1* If you adding a newly discovered network attached printer, you must first initiate the HAL add-on module. For instructions, see Initiating the HAL Network Device Discovery Add-On Module.
Immediately after the printer has been discovered by the system, the Add Printer Queue dialog is displayed:
- For the following settings, make any necessary modifications:
1* Name
The system inserts the standard printer model name. Type the name of the printer.
For example:
HP_LaserJet_4650
1* Description (Optional)
The Description is typically the location of the printer. - Verify the manufacturer and model information.
If the exact printer model is not available, the system will provide information for a compatible printer model. For example, if you set up an HP Laser 3015 printer, the model that is supplied by the system is an HP Laserjet 3.
Caution - In some instances, the OpenSolaris Print Manager associates an incorrect PPD file with a newly added print queue. If you encounter this problem, it is possible the printer might not print until the correct PPD file is associated with the printer. To correct the problem, modify the newly added print queue by using Solaris Print Manager. Note that you must be superuser or assume an equivalent role to modify a print queue by using Solaris Print Manager. For more information about adding and modifying printers by using Solaris Print Manager, see Setting Up Directly Attached Printers by Using Solaris Print Manager.
For information about using the ppdmgr utility to add a PPD file to the system, see Setting Up Printers That are Associated With PPD Files.
- (Optional) To set the printer as the default, click the Set Printer as Default check box.
- Click OK and close the window to save your changes.
Immediately after completing this step, a notification dialog is displayed. The name of the newly added printer is displayed, along with a notification that lets you know the printer is online and ready to print.
Note - By default, the panel notification applet is displayed on the lower right side of the GNOME Desktop. However, if the panel notification applet has been moved, the notification is displayed in the new location. If the panel notification applet has been removed from the GNOME Desktop, notifications are not displayed.

The notification displays each time a previously configured printer is connected or disconnected from the system and when the printer is powered on or off.
- Verify that the newly added printer is displayed in the list of configured printers in the Print Manager application.
Main Menu → Administration → Printer Queue Monitor
The Print Manager window is displayed.
Note - The Print Manager application is not the same application as the Solaris Print Manager GUI, /usr/sbin/printmgr, that is used to set up and administer printers in the Solaris OS. Solaris Print Manager (Print Manager) is also accessible from the GNOME Main Menu. However, you must be superuser, or assume an equivalent role, to set up printers by using this printing tool.
- From the View menubar, choose the Select Printers to Show menu item:
View → Select Printers to Show
The Select Printers to Show secondary window is displayed. - Click the Show All button, then click OK.
The newly configured printer is displayed in the list of printers. - Close the window.
- From the View menubar, choose the Select Printers to Show menu item:
See Also
For troubleshooting purposes, you might need to check for discovered printers by using the command line. See How to Obtain Information about Discovered Printers by Using the Command Line for more information.
Modifying Printer Preferences in the GNOME Desktop Environment
You do not need any special authorizations to modify printing preferences and notifications in the GNOME Desktop Environment. The Basic Solaris User profile has been modified to enable the console owner to add and configure local print queues and modify printing preferences and desktop notifications. When you log in to your GNOME Desktop session, this profile is automatically assigned to you.
How to Modify Printer Preferences and Notifications in the GNOME Desktop Environment
- From the GNOME Main Menu, select :
Main Menu -> Preferences
The Printer Preferences window is displayed.
Note - You can access the Printer Preferences application directly from the GNOME Desktop when a printer icon is visible in the Notification Area of the bottom edge panel. When you initially hotplug a USB printer, a printer icon is briefly displayed. Normally, this icon is transient. To access the Printer Preferences by using this method, right-click the printer panel object. From the popup menu that is displayed, select the Preferences menu item. Make any modifications, then close the window to save the changes.
1* To deselect either of the following available default preferences, remove the corresponding checkmark from the check box:
1 When a new printer is connected:
Show Printer Properties
1 When a printer is disconnected:
Show Notification
- To save your changes, close the window.
How to Modify Printer Preferences for How Documents are Shown
- From the GNOME Main Menu, select the Printer Queue Monitor application:
Main Menu -> Administration -> Printer Queue Monitor
The Printer Queue Monitor window is displayed. - From the Edit menubar, select the Preferences menu item.
The Preferences secondary window is displayed.
1* To change the Documents to Show default preference from Everyone's to Only Mine, click the corresponding radio button.
1* To modify the Update Interval in Seconds preference, move the slider to the desired range. The available range of seconds to choose from is between 5 and 290 seconds. The default setting is 30 seconds. - To save your changes, close the window.
Obtaining Information About Discovered Printers
How to Obtain Information about Discovered Printers by Using the Command Line
- On the system that you want to get information about discovered printers, type:
system% **hal-find-by-capability ~--capability printer**
The output shows you all of the printers that have been discovered by the system.
Example 10-2 Obtaining information About Discovered Printers by Using the Command Line
This example shows all of the devices discovered by the system, snoopy.
snoopy% **hal-find-by-capability ~--capability printer**
/org/freedesktop/Hal/devices/pci_0_0/pci1022_7460_6/pci108e_534d_3_1/printer_2_printer_0
snoopy%
How to Obtain Additional Details About Discovered Printers by Using the Command Line
- On the system that you want to obtain additional information about discovered printers, type:
zsh% **for udi in $(hal-find-by-capability ~--capability printer) ; do ; lshal ~--show $udi ~--long ; done**
Or, if you are using a shell that does not support the use of $(command), type:
sh% **for udi in `hal-find-by-capability ~--capability printer` ; do ; lshal ~--show $udi ~--long ; done**
After a printer has been discovered, configure the print queue by using the automatic printing configuration feature in the GNOME Desktop Environment or by using the lpadmin command. To configure the print queue in the GNOME Desktop Environment, see How to Add a Newly Discovered Printer in the GNOME Desktop Environment. To configure the print queue by using LP print commands, see How to Add a New Directly Attached Printer by Using LP Print Service Commands.
Example 10-3 Obtaining Additional Details about Discovered Printers by Using the Command Line
zsh% **for udi in $(hal-find-by-capability ~--capability printer) ; do ; lshal ~--show $udi ~--long ; done udi = '/org/freedesktop/Hal/devices/pci_0_0/pci1022_\ 7460_6/pci108e_534d_3_1/printer_2_printer_0'**
info.claimed.uid = 24656 (0x6050) (int)
info.claimed.service = 'gnome-volume-manager' (string)
info.claimed = true (bool)
printer.commandset = {'PJL', 'MLC', 'BIDI-ECP', 'PCLXL', 'PCL',
'PDF', 'PJL', 'MIME', 'POSTSCRIPT'} (string list)
printer.description = 'Hewlett-Packard color LaserJet 4650' (string)
printer.serial = '00000D920NSL' (string)
printer.product = 'hp color LaserJet 4650' (string)
printer.vendor = 'Hewlett-Packard' (string)
printer.device = '/dev/printers/1' (string)
info.capabilities = {'printer'} (string list)
info.category = 'printer' (string)
info.solaris.driver = 'usbprn' (string)
solaris.devfs_path =
'/pci@0,0/pci1022,7460@6/pci108e,534d@3,1/printer@2:printer' (string)
info.product = 'printer' (string)
info.udi =
'/org/freedesktop/Hal/devices/pci_0_0/pci1022_7460_6/pci108e_534d_3_1/printer_2_printer_0'...)
info.parent =
'/org/freedesktop/Hal/devices/pci_0_0/pci1022_7460_6/pci108e_534d_3_1/printer_2_if0_0'...)
zsh%
| Previous | Index | Next |