Configuring Printers

Serial and parallel printers that are directly attached to the JavaStation

Printers located on the network

Printer access is configured using JavaOS properties. The JavaOS properties used to set up each type of printer are listed below.

Table 9-1 JavaOS Properties Used to Set Up JavaStation
Printers

Printer Type

JavaOS Properties

NIS network printer

javaos.printers.selected

(Optional) javaos.printservice.NIS.mapname

lpd network printer

javaos.printers.selected

javaos.printservice.lpd.printers

Local serial printer

javaos.printservice.local.params.serial-port

Local parallel printer

javaos.printservice.local.params.parallel-port

This chapter describes the properties in the preceding table in detail and explains their possible settings. For complete instructions on setting JavaOS properties, see "Setting Properties".

NIS Network Printers

The JavaOS software receives NIS printer names in a JavaOS property and relies on the NIS map printers.conf.byname for printer addresses. To set up NIS printer access for the JavaStation computer, use the following procedure.

To Set Up NIS Printer Access

Use the javaos.printers.selected property to set printer names.

This property is a semicolon-separated list of entries with the syntax print_service:printer@server. For example:

-djavaos.printers.selected=NIS:mde@mde-host;NIS:mdecolor@mde-host

The above example specifies that mde and mdecolor are NIS printers available to the JavaStation computer, and that mde-host is their server.

Set up an NIS printer map.

The printers.conf.byname NIS map is the default NIS map for printers for the JavaStation computer.

If printers.conf.byname already exists, you do not need to do anything.

If the name of the NIS printer map is something other than printers.conf.byname, you can configure the JavaOS software to use the new map name by setting the javaos.printservice.NIS.mapname property. For example:

-djavaos.printservice.NIS.mapname=js.nismap

Whenever you add or remove printers, follow the procedure below to update the NIS map (must be done every time).

To Create an NIS Printer Map

On the NIS server, use Admintool to set up the printers.

Refer to the chapter titled "Managing Printing Services" in the Solaris
2.6 System Administrator Guide.

On the NIS server, become root and type the following commands to push the map out.

lpd Network Printers

You can use two different properties to specify lpd printer names to the JavaOS software.

To Set Up lpd Printer Access

Use either javaos.printers.selected or javaos.printservice.lpd.printers to list the lpd printers accessible to the JavaStation computer.

The javaos.printers.selected property is a semicolon-separated list of entries with the syntax print_service:printer@server. It is a system property that must be set using the -D flag. For example:

-Djavaos.printers.selected=lpd:raw@konaprint

The javaos.printers.selected property can list both NIS and lpd printers. For example:

-Djavaos.printers.selected=NIS:mde@mde-host;lpd:raw@konaprint

Alternatively, you can use the javaos.printservice.lpd.printers property to specify lpd printers. The syntax for each printer is printer@server. For example:

-djavaos.printservice.lpd.printers=SPARCprinter@chaco

Local Printers

All JavaStation models support local printing over a serial port. Future JavaStation models will also support local printing over a parallel port. (However, this feature is not available at this writing).

To Set Up a Local Serial Printer

Use the javaos.printservice.local.params.serial-port property to set serial port transmission parameters.

The port portion of this property is the name of a serial port, which can be:

SerialA or SerialB for an on-board JavaStation serial port (SerialB is not available on any JavaStation model at this writing)

One of SerialP1 - SerialP8 for a serial port enabled by the multiport serial card (MPSC), which is not available on any JavaStation model at this writing

The syntax of the parameters is baud_rate:data_bits:stop_bit: parity: flow_control. For example:

An application running on the JavaStation computer must use the CommPort API to communicate with the JavaStation serial port. To view the CommPort API, go to http://www.sun.com/javastation.

To Set Up a Local Parallel Printer

Use the javaos.printservice.local.params.parallel-port property to enable the parallel port.

The port portion of this property is the name of the parallel port. At this writing, a parallel port is not available on any JavaStation model. To enable the parallel port, you would set this property to true as follows:

-djavaos.printservice.local.params.parallel-LPT1=true

An application running on the JavaStation computer must use the CommPort API to communicate with the JavaStation parallel port. To view the CommPort API, go to http://www.sun.com/javastation.

Configuring a Touch Screen

A touch screen can be connected to the JavaStation serial port for user input when the JavaStation computer is implemented as a kiosk.

Since the touch screen functions as a mouse, a facility outside the JavaOS software is needed to generate mouse events. A handler applet or application must be written, using the CommPort API and the MouseInput class, to move the cursor and generate button press events. To view the CommPort API and the MouseInput class, go to http://www.sun.com/javastation.

To Set Up a Touch Screen

Use the javaos.printservice.local.params.serial-port property to set serial port transmission parameters.