Netra j 2.0 Administrator's Guide

Setting Properties

You can set the properties that control JavaOS operation on the JavaStation in one of two places:

The second option is preferable because the total length of DHCP Vendor Options is limited to 255 characters. In contrast, the text file can have any length.

Syntax

Each property setting must use one of the flags in Table 9-6. There is no space between each flag and its value. Note that certain flags are used only for JavaOS properties, while others are used only forsystem properties.

Table 9-6 Property Flags

Flag 

Syntax  

Definition 

-d

-dJavaOS_property=value

The property name and value are stored in the JavaOS properties object. The names of properties set with this option always begin with javaos. Example: -djavaos.kbd=UKPS2

-D

-Dsystem_property=value

The system property and value are stored in the global system properties object. Example: -Duser.timezone=PST.

-a

-aJavaOS_property=value

The JavaOS property is set to the given value if it has never been set before. If the property already has a value, then its current value is appended with a semicolon and the value.  

Example: -ajavaos.printservice.lpd.printer\ =printer2

This example sets the property javaos.printservice.lpd.printer to printer2 if the property has no current value. If the property already has a value (say, printer1), the new value is appended (printer1;printer2).

This flag is useful if you are building the value of a property from multiple places using the -i option below. Note that this property can itself be a semicolon-separated list of values; the entire list is added or appended as described above.

-A

-Asystem_property=value

This works just like the -a option, except that it sets system properties.

-u

-uJavaOS_property

Used to undefine a JavaOS property. 

-U

-Usystem_property

Used to undefine a system property. 

-i

-iHTTP_URL

The HTTP URL is expanded and the file referenced by the URL is itself evaluated as if it were a JavaOS command line. Properties are stored one per line in this file. One file can use -i to include another file. There is currently no check on infinite recursion.

Properties will be interpreted as the JavaOS command line, which is a formatted text string of any length that is interpreted when JavaOS boots. The command line can include:

The syntax of the command line is as follows:

prop_setting1 prop_setting2... prop_settingn -- arg1 arg2... argn

where prop_setting is a JavaOS property setting and arg is an argument. Property settings and arguments are separated by two contiguous hyphens.

To Reference a Properties File in the DHCP Vendor Options

Use the -i flag described in Table 9-6 in a dhcptab macro (see Chapter 8, Booting the JavaStation Using Solaris). The relevant line of the macro should have the following syntax:


JOScmd1="-ihttp://
hostname[:port_number]/
filename"

The text file should contain property settings using the flags described in Table 9-6 and can also include arguments. Each property setting and argument is typed on a separate line, with the separator hyphens on their own line, as follows:


-Duser.timezone=PST
-djavaos.login=false
--
http://www.sun.com

The following is a sample properties text file.


# Sample text file of JavaOS properties
################################################################# General setup
############################################################

# Define the key that brings up the screen console (PRINTSCREEN
# is the default)
-djavaos.consoleHotKey=VK_PRINTSCREEN

# Set up values that will be returned by SNMP in the System MIB
-djavaos.snmpSysContact=JavaOS group, js_team@ignacio
-djavaos.snmpSysLocation=JavaSoft

################################################################# Locale-specific settings
###########################################################

# Set Server for /REMOTE file system
-ajavaos.mountlist=fred:/tftpboot/lunaserver/classes[boxv  ]/REMOTE
# We're all on the US West Coast...
-Duser.timezone=PST

# Set list of countries we support, English first
# (The order doesn't matter, but the Login window shows them
# in the order in which they appear in the property list.)
-djavaos.loginLocaleList=en_US

# Add the European Locales
-ajavaos.loginLocaleList=fr_FR;de_DE;it_IT;sv_SE;es_ES

# Add the Asian Locales
-ajavaos.loginLocaleList=ja_JP;ko_KR;zh_CN;zh_TW
################################################################# FONT-specific settings
################################################################

# Set the server location for where to find fonts for the 
# /FONTS directory
-ajavaos.mountlist=fred:/tftpboot/lunaserver/fonts[boxv  ]/FONTS 
################################################################# Printing properties
################################################################

# Always show these printers
-djavaos.printdialog.alwaysShowPrinters=NIS:dirk@fred;\
NIS:rita@scorpio

# The name of the NIS map for printers (this is the default, so it's
# not really necessary)

-djavaos.printservice.NIS.mapname=printers.conf

# Set up the hardware parameters for locally connected printers
-djavaos.printservice.local.params.serial-Serial=57600:8:1:none:hh 

################################################################# set doc.url
# This allows us to read the HotJava Browser User's Guide from 
# a server.
################################################################ 
-Ddoc.url=http://fred.eng/JavaOS/LunaApps/