|
|
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:
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)
Overview of Automatic Printer Discovery and ConfigurationAutomatic 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:
How Automatic Printer Discovery WorksPrinter 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 DiscoveryThe 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 DiscoveryDesktop 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:
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 DiscoveryNetwork 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:
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 ModuleNetwork 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 EnvironmentThe 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.
Administering the Network Device Discovery Service by Using SMFThe 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 SMFThis 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.
How to Initiate a Single Scan of the Network for Newly Discovered Devices
How to Disable the SMF Network Device Discovery Service
See AlsoTo 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 PropertiesUse 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 PropertiesThis 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 EnvironmentYou 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 EnvironmentThis procedure describes how to set up and configure newly discovered directly attached or newly discovered network attached printers by using GNOME Desktop tools.
See AlsoFor 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 EnvironmentYou 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
How to Modify Printer Preferences for How Documents are Shown
Obtaining Information About Discovered PrintersHow to Obtain 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
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%
|
||||||||||||||||||||||||||||||||||||||||||||