JavaStation Client Software Guide

Setting Properties


Note -

Only experienced Solaris system administrators should set JavaOS properties using the following methods. Inexperienced Solaris users should use the Netra j software. For information on Netra j, go to http://www.sun.com/netra-j or refer to the Netra j 3.0 Administrator's Guide.


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

The second option is preferable because the total length of DHCP Vendor Options is limited to 255 characters. If you exceed this length, the remaining text is lost and the JavaStation computer will not receive all of the options. No errors are reported by the dhcp daemon, but incorrect behavior is viewed on the JavaStation computer.

In contrast, the text file can have any length.

If you set a property in the DHCP options and in a text file, the value set in the text file will be used because it was the last value delivered to the JavaStation computer.

Syntax

Each property setting must use one of the flags in the table below. 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 for system properties.

Table 4-7 Property Flags

Flag 

Syntax  

Definition 

-d

-dJavaOS_property=value

Used to define a JavaOS property. 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

Used to define a system property. 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.

Note that -a and -A are equivalent to -d and -D, except for the append behavior.

-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 the JavaOS software 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.

Referencing a Properties File in the DHCP Vendor Options

This is the preferred method for setting JavaOS properties because dhcptab entries are limited to 255 characters.

Use the -i flag described in the preceding table in a dhcptab macro (see Chapter 2, JavaStation Boot Process: Theory of Operations ). The relevant line of the macro should have the following syntax:


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

The text file should be located in the web server root directory. It should contain property settings using the flags described in the preceding table. It can also include arguments. Each property setting and argument should be typed on a separate line, with the separator hyphens mentioned above 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:/export/root/javaos/classes|/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:/export/root/javaos/fonts|/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/