SmartWare Unix Read Me 1: Installation 2: X11 Mode Configuration 3: Character Mode Configuration 4: Printers and Other Resources 5: How to Use SmartWare ------------------------------------------------------------------------------------------------------------------ Section 1: Installation Introduction This section contains instructions for installing SmartWare Plus on all supported Unix platforms. The complete SmartWare Plus package includes a SmartWare executable for character based terminals and X Windows terminals as well as an application Developer system that operates on SmartWare - all three are installed at the same time. Requirements A supported version of Unix with approximately 35MB disk space free. Installation Due to the nature of Unix, installation of SmartWare Plus and the subsequent configuration of your Unix system, may vary. In general, the following information should give a reasonable outline. When in doubt, refer to the label on the SmartWare media, particularly in regard to the restore command. If you received a separate installation sheet with your SmartWare Plus package, follow those instructions. Basically, the installation process consists of restoring the SmartWare Archives from the distribution media (e.g., tape) and then executing an installation script. Restoring the SmartWare Archives This process moves the SmartWare packages and the install script from the distribution tape or diskette to the Unix file system. Because this is unnecessary when installing from downloaded packages, skip to the next section, Creating the SmartWare Directory. Regardless of whether you are restoring from tape or diskette, you should determine the device name before beginning. Refer to your operating system's manual or ask your System Administrator for the appropriate name. Here is a list of possible device names: /dev/rfd0135ds18 3.5 inch media (first diskette drive) /dev/rfd1135ds18 3.5 inch media (second diskette drive) /dev/rfd096ds15 5.25 inch media /dev/rct0 tape drive /dev/tape general tape drive name Step 1: Change to a directory that will receive the packages. You can place the packages in any directory however, an empty temporary directory is recommended. For example, this list of commands will change to your home directory then create a temporary directory and move to it. cd mkdir tmp cd tmp An alternative is to place the packages in the angoss directory. For information on creating this directory, see Creating the SmartWare Directory below. Step 2: Issue the restore command. After changing to the appropriate directory, run one of the following restore commands - substitute the appropriate media device name into the /dev/name slot. Note that, if the label on the SmartWare media lists a different restore command or, if you received a separate installation sheet, follow those instructions instead. Tape, CD: tar -xvf /dev/name Disk: tar -xvMf /dev/name Notes: The -M parameter, used in the disk tar example above, may not be available on all platforms. SUN users may need to turn the Volume Manager off - kill the vold daemon - before issuing the restore command. Refer to your operating system's documentation. Creating the SmartWare Directory Option 1: If you are installing SmartWare for use by yourself only, the recommended location is a subdirectory called angoss below your home directory. To create and move to this directory, use the following commands: cd mkdir angoss cd angoss Option 2: If you are installing SmartWare for use by a number of users, the recommended location is /usr/angoss. You will probably need super user access to perform the following commands. As super user, create the directory then change the ownership of that directory to an appropriate user. For example: su mkdir /usr/angoss chown smartusr /usr/angoss Note: Creating a specific SmartWare user may make administration of the system easier. For instance, the above example uses one called smartusr. However, this is not necessary and any user, other than the super user, is valid. Installing the SmartWare Packages Step 1: Become the appropriate user. If you are not already the appropriate user, use the su command to switch to it. For example: su smartusr This is required because, after issuing the installation command, the current user will own the SmartWare files. Note that this can be anyone except the super user. If you restore as the super user, ownership of SmartWare files may be unpredictable. Step 2: Change to the directory that contains the SmartWare packages. If you are not already in this directory, change to it. For example: cd /usr/angoss Step 3: Run the installation script The anginstall script uncompresses then unarchives each of the SmartWare packages and optionally deletes each package after it is processed. Note that this script must be run from the directory that contains the packages. The anginstall script has the following command line parameters: -d The destination directory. If the current directory and the destination directory are not the same, the -d parameter must be used. By default, the current directory is used. -r Remove packages after processing. Cannot be used with the -s parame- ter. * -s Save (do not remove) packages after processing. Cannot be used with the -r parameter. By default, packages are not removed. * -x Display usage information. This is equivalent to using no parameters. * If you are installing from a read-only directory or CD ROM, the packages are copied before they are uncompressed. In this case, the -r and -s parameters refer to the copied files. At least one parameter must be used. For example, to install SmartWare in the recommended directory and remove the packages, execute: ./anginstall -r -d /usr/angoss When the script has successfully completed its processing, a directory structure below the destination directory will contain the SmartWare files. Note: You can avoid installing one (or more) of the packages by deleting it prior to running the anginstall script. For example, to avoid installing the tutorials, delete the package named tutorial. Do not delete base or system. Also, the X11 and font packages are required for X. The char package is required for character mode. Step 4: Run the X11 font installation script. If you intend to run SmartWare on X11, execute the xfontinstall script. This installs the SFF fonts recommended for use in WYSIWYG mode (e.g., font.italic). The script must be run from the ANGOSS root directory - super user access is probably required. For example: cd /usr/angoss su ./xfontinstall Although no parameters must be passed, the xfontinstall script uses: -d The font destination directory. By default, /usr/lib/X11/fonts/misc is used except on the SUN where /usr/openwin/lib/fonts is the destina- tion. -x11 The location of the X11 executables: mkfontdir and xset. By default, the script looks in /usr/bin/X11, /usr/X11/bin, or /usr/openwin/bin. -pcf Font type. Default on all but UnixWare and SUN. -snf Font type. Default on UnixWare. -fb Font type. Default on SUN. -x Display usage information. If you have problems running this script, try forcing the default parameters with values. For instance, use the -fb font type parameter on a SUN machine. Otherwise, refer to the X11 Mode Configuration in which the section titled SFF Fonts discusses how the xfontinstall script operates. The xlsfonts utility lists available server fonts. To test whether the SFF font installation was successful, run this utility and search for the string sff. For example: xlsfonts | grep sff This should produce a list of available SFF fonts. Setting Environment Variables The PATH and ANGOSS Variables To run properly, you must have the location of the SmartWare executable files in the PATH variable. Executables reside in the bin directory below the main product directory. For example: /usr/angoss/bin Also, the ANGOSS environment variable must be set to the main product directory. In the Bourne shell, lines similar to the following can be added to the end of .profile files: PATH=/usr/angoss/bin:$PATH export PATH ANGOSS=/usr/angoss export ANGOSS For the cshell, append lines to the end of .login or .cshrc files: set path = (/usr/angoss/bin $path) setenv ANGOSS /usr/angoss The DISPLAY Variable for X11 To run under the X11, SmartWare needs to know which display to connect to. To do this, it looks at the DISPLAY environment variable which should be set to your X11 device. Normally, this is your machine name followed by a :0.0. For instance, in the bourne shell on a machine named gold, execute: DISPLAY=gold:0.0 export DISPLAY or, in cshell on a machine named sodium: setenv DISPLAY sodium:0.0 In some cases, where the workstation (or host) is the X terminal, the machine name can be dropped. For example: setenv DISPLAY :0.0 The LD_LIBRARY_PATH Variable for Shared Libraries If you are running SmartWare on a SUN machine, the LD_LIBRARY_PATH variable must be set to the shared library paths and the ANGOSS lib directory. For example: /usr/lib/X11:/opt/SUNWmotif/lib:/usr/angoss/lib Nodes After installation, SmartWare does not yet contain serial numbers or user nodes. If no user nodes are present, SmartWare will run in demonstration mode. Note: Printing from any module and saving in the wordprocessor and spreadsheet modules are disabled when running in this mode. Adding the Initial Node Set The initial node set consists of one node for SmartWare and one for the Developer system. A node key card, included with the product, specifies two key codes that are used to generate the first node set- this does not apply to downloaded or demonstration copies of SmartWare unless nodes were ordered separately. To create the node set, change to the nodes subdirectory beneath the main product directory and execute the newnodes program for each type. Specify the appropriate node file name and key as in the following example: cd /usr/angoss/nodes /usr/angoss/bin/newnodes nodes.usr /usr/angoss/bin/newnodes devnodes.usr Notes: A key will not contain: zero, one, lower case L or upper case I. If the key contains an exclamation character, proceed it with a literal sign (i.e., \!). If the key contains an at (@) symbol and that symbol kills input, run stty intr ^c to change the interrupt key. Additional Nodes Since each node set allows one user or process to run, only a single user will have the ability to access SmartWare - including the Developer system - at a time. For multiple user access to SmartWare, additional nodes are required. The number of nodes currently installed can be shown by the dmpnodes program. This program presents a list of the contents of the nodes.usr and devnodes.usr files. For example, to discover the number of nodes available to SmartWare: /usr/angoss/bin/dmpnodes -a /usr/angoss/nodes/nodes.usr This command will produce a listing similar to the following: SN: ba00001000, 2 nodes N001 ba00001000 N002 ba00001001 The opening line shows the first serial number plus the number of nodes; the remaining lines are the actual serial numbers. If dmpnodes is issued without the -a parameter, only the opening line is displayed. Purchasing Nodes Nodes can be purchased as a node key faxed to you or, as a node file that is physically shipped on diskette. Before contacting ANGOSS Software for additional nodes, run the lastnode program specifying the appropriate node file. For example: /usr/angoss/bin/lastnode /usr/angoss/nodes/nodes.usr This will produce the number of nodes currently on your system, the last serial number, and the version number. Please include this information with your purchase order. Installing Additional Nodes Node Key Method This process is identical to adding the initial node. First, ensure that no one is currently running SmartWare, change to the nodes subdirectory and execute the newnodes program. Specify the appropriate node file name and key as in the following example: cd /usr/angoss/nodes /usr/angoss/bin/newnodes nodes.usr /usr/angoss/bin/newnodes devnodes.usr Notes: A key will not contain: zero, one, lower case L or upper case I. If the key contains an exclamation character, proceed it with a literal sign (i.e., \!). If the key contains an at (@) symbol and that symbol kills input, run stty intr ^c to change the interrupt key. Diskette Method This process is a little more complicated than the key method because the additional nodes must be restored from diskette and then added to the node file or files. Step 1: Change to the nodes directory. For example: cd /usr/angoss/nodes Make sure that you have permissions to modify the nodes.usr file and to add files to this directory. Step 2: Issue the restore command. After changing to the appropriate directory, run the following restore command - substitute the appropriate media device name into the /dev/name slot. Note that, if the label on the diskette lists a different restore command or, if you received a separate installation sheet, follow those instructions instead. tar -xvf /dev/name Step 3: Execute the addnodes program. The addnodes program requires the -u parameter followed by the existing node file name and the new nodes file name. For example: /usr/angoss/bin/addnodes -u node.usr nodes.1 When complete, the number of records written to the node file is displayed. Note that you can only add SmartWare nodes to nodes.usr and Developer nodes to devnodes.usr. Note: If you have more than one new nodes file and all of these are to be added to the same system, use a wildcard for the extension or repeat this step for each file. Step 4: Delete the new nodes file. If addnodes ran successfully, nodes from the new nodes file will have been added to the existing file. You may want to confirm this with the dmpnodes program before deleting new nodes files. Permissions All users must have read/write access to the nodes files. For example: chmod 666 /usr/angoss/nodes/*.usr ------------------------------------------------------------------------------------------------------------------ Section 2: X11 Mode Configuration Like many X11 applications, a variety of items in SmartWare are configurable through resource settings. This section discusses setting those X resources that are specific to SmartWare. The section also contains a description of the SmartWare SFF fonts - if you were unable to install the SFF fonts, refer to this section. If you are not running X11, refer instead to section, Character Mode Configuration. X11 Resources An X11 resource is a simple name: value binding. For example, *background: black An X11 application builds a database of these resources by reading a resource file or files consisting of lines like the above. Command line options may also be read. SmartWare Resource Database Construction SmartWare begins by building its own database from one or more of the sources listed in the table below. Note that a resource which occurs earlier in this list, takes precedence over one that follows it. Command line options. The file specified in the XENVIRONMENT environment variable is read. The X-server's resource-database, or the file ".Xdefaults" (possibly called .Xresources) in the user's home directory is read. Any file "XAngoss" inside any directory "X11/app-defaults" pointed to by the ANGOSS environment variable is read. The file "/usr/lib/X11/app-defaults/XAngoss" is read. For general (non SmartWare-specific) information on X11 resources, check the X11 documentation. SmartWare X11 Resources Detailed The general form of a resource name is: angoss*RESOURCE For example, the geometry resource is given the name: angoss*geometry Setting the window size to 80 columns by 50 rows can be accomplished with the geometry resource: angoss*geometry: 80x50 In the following list, the string angoss and the asterisk are omitted. Resource Description geometry: Specifies the size of the window. The format is COLSxROWS, (e.g., 80x50). The minimum size is 80x24. These are strict - SmartWare will use 80x24 if you give a screen smaller values than this. Maxi- mum values depend on the font selected and the size of the screen. If the maximum size is exceeded, SmartWare will again use 80x24. The default is 80x50. font: Names the X11 font to draw text with. It is strongly recommended to use the SPC family of fonts, as they contain the needed special char- acters for box and line drawing etc. The fixed font is used as a fall- back. However, if no font can be found, SmartWare will complain and exit. There are a number of font tools that may have been shipped with your X11 software - of these, the xlsfonts utility lists available server fonts. Refer to the X11 documentation for more information. font.italic: font.thin-caps: font.superscript: font.strikeout: font.greek: font.symbol: font.graphics: font.thick-caps: font.gothic: font.script: These specify which fonts are used to draw WYSIWIG mode charac- ters on the screen. They must be the same size as the standard font resource listed above. It is recommended that the SmartWare SFF fonts be used here. There are no defaults. If a size-mismatch is detected or, the font can't be found, the standard font is used in its place. title: This string appears on the title bar of the window. The default is ANGOSS SmartWare. monitor: Specifies a string to search the resource database for color informa- tion. It is called monitor because a specific monitor can be named here however, the usual setup is to use color, gray, or mono. The value of monitor is used to make the color resources described below. See also Default Monitor Values. monitor.00: monitor.01: monitor.02: etc. monitor.15: Specifies the 16 SmartWare colors. These resources are created via the monitor resource described above. Values here specify valid color names, such as red, in the local color- name database. For example, if monitor is set to color: angoss*color.09: red means that, when you draw text within SmartWare using color num- ber 9, that text appears on your screen in red. See also Default Monitor Values. Default Monitor Values SmartWare recognizes five special monitor names. These fall into the three basic types - color, gray, and mono - that are mentioned in the monitor resource. Given the monitor type, the default values are listed where applicable: Monitor Description color colour Both mean the same thing and imply that the X server can dis- play a minimum of 16 distinct colors. 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 #000000 #000080 #008000 #008080 #800000 #600080 #805000 #a0a0a0 #303030 #0000ff #00ff00 #00ffff #ff0000 #ff00ff #ffff00 #ffffff black dark blue dark green dark cyan dark red dark magenta brown grey dark grey blue green cyan red magenta yellow white gray grey Both mean the same thing and imply that the X server can dis- play a minimum of 16 distinct gray-scales. 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 #000000 #111111 #222222 #333333 #444444 #555555 #666666 #777777 #888888 #999999 #aaaaaa #bbbbbb #cccccc #dddddd #eeeeee #ffffff mono This implies a bi-level display. The background color is specified by either black or background. For instance: angoss*mono.black: black angoss*mono.background: black are identical resources as far as SmartWare is concerned. The default for black is black. The foreground color is given by white or foreground. The default is white. The synonyms foreground and background are present so that SmartWare will use the X-server defaults other applications use. Any other monitor name is permitted, but it is up to the user to setup color information for all 16 colors. There are no defaults in this situation and a lack of information will cause SmartWare to halt. Resource File Example ! ANGOSS X11 Resource File angoss*geometry: 90x50 ! FONT settings angoss*font spc08x14e angoss*font.italic sff08x14b angoss*font.thin-caps sff08x14c angoss*font.superscript sff08x14d angoss*font.strikeout sff08x14e angoss*font.greek sff08x14f angoss*font.symbol sff08x14g angoss*font.graphics sff08x14h angoss*font.thick-caps sff08x14i angoss*font.gothic sff08x14j angoss*font.script sff08x14k ! MONITOR settings angoss*gray.00: black angoss*gray.01: gray7 angoss*gray.02: gray13 angoss*gray.03: gray20 angoss*gray.04: gray27 angoss*gray.05: gray33 angoss*gray.06: gray40 angoss*gray.07: gray47 angoss*gray.08: gray53 angoss*gray.09: gray60 angoss*gray.10: gray67 angoss*gray.11: gray73 angoss*gray.12: gray80 angoss*gray.13: gray87 angoss*gray.14: gray93 angoss*gray.15: white ! TITLE angoss*title ANGOSS SmartWare Resource Start Up Parameters Resource values can be specified on the command line by passing the resource name followed by the required value. The resource name must be preceded by a dash (-) and the value separated from the name by a space. For a list of resource names, refer to the section, SmartWare X11 Resources Detailed. Note however that the full name is not used, that is, "angoss*" is not specified on the command line. For example, to set the geometry to 80x24, the command line would be: xoac -geometry 80x24 Resource start up parameters override any other resource settings. SFF Fonts The SFF fonts recommended for use as the "WYSIWYG" fonts (e.g. font.italic) are placed in the /usr/angoss/resource/X11/fonts directory. Because of differences from one system to another, these font files are shipped in Bitmap Distribution Format (BDF) and must be compiled before use. The compiled format can be Server Normal Font (SNF), Portable Compiled Format (PCF), or X11/NeWS format. PCF is the default format. These fonts are nearly identical to the IBM PC or PC-8 character set. The SPC fonts, which are available on some systems, can be used instead. Manual Installation of SFF Fonts This section essentially describes what the xfontinstall script performs during installation. Note: The following steps should only be used on systems where the xfontinstall script was not successful. To perform these steps may require root user access. Step 1: Compile fonts. To compile fonts, change to the SmartWare fonts directory and execute the sff_install script specifying the desired format and output directory. A typical example: cd /usr/angoss/resource/X11/fonts ./sff_install -pcf /usr/lib/X11/fonts/misc The sff_install flag, -pcf, is the default format and is therefore not required. Note that UnixWare, may not have the PCF compiler; if so, use the -snf flag. Sun/Solaris will probably not have either the PCF or SNF compilers; use the -fb flag instead. Use the -x flag with ssf_install to see a list of options. The output directory /usr/lib/X11/fonts/misc is a common place for system font files however, depending on your system and its setup, this may be a different directory. If your X version has the xset utility, run it with the -q flag to determine the current font directory or directories. Step 2: Create the X font files index. When the font files have been compiled, run the X11 utility mkfontdir, specifying the same output directory used in sff_install above. This creates a file that the X server uses to determine what fonts are available. For instance: mkfontdir /usr/lib/X11/fonts/misc Step 3: Reset the fonts path. Finally, for these changes to take effect, run the X11 utility, xset with the fp rehash parameter. For example: xset fp rehash If your X version does not have xset, try restarting your X server and font server. The xlsfonts utility lists available server fonts. To test whether the SFF font installation was successful, run this utility and search for the string sff. For example: xlsfonts | grep sff This should produce a list of available SFF fonts. Note: It is possible to install the SFF fonts in a different directory, that is, one not in the Font Path listed by xset -q. Refer to your X11 documentation on the xset utility using the +fp or fp+ parameters. ------------------------------------------------------------------------------------------------------------------ Section 3: Character Mode Configuration This section discusses unique configuration aspects for the character version of SmartWare. If you are running under X11, you may want to use the graphical executable instead. Refer to the X11 Mode Configuration for information. Character Terminal Setup Typically, character mode applications use terminfo to determine how keystrokes are interpreted and how characters are displayed on the screen. SmartWare uses this mechinism but also includes an extended version to handle special cases which allow for the use of monkey bar graphic characters and the redefinition of keystrokes. As with terminfo, the extended version settings are determined by the TERM environment variable. For more information on terminfo, refer to your operating system's documentation. Creating and Editing etic Files While terminfo has many of the required settings used by SmartWare, it does not provide the ideal key combinations and special character display information. For this reason, SmartWare uses an extended form of terminfo files called etic files. A utility program, also named etic (Extended Terminal Information Compiler) is used to build the extended terminal information. This program turns source - a text file - into a compiled terminal information file in the same way that terminfo files are created. It can also decompile both etic and terminfo files. Editing etic Source Files Any text editor can be used to create or modify source files. Existing etic files have .tic extensions and reside in subdirectories below the angoss/info directory - like terminfo files, these subdirectories are based on the first letter of the file. For example: /usr/angoss/tinfo/a/ansi.tic Essentially, etic files are terminfo files with additional capabilities. Anything that is valid for a terminfo file is also valid for an etic file. Special SmartWare instructions however, must be preceded with a left brace: {cmap When SmartWare starts up it will search for the terminfo and etic files. If both are present, both will be read into memory. When designing an etic file to work in conjunction with a terminfo file, avoid duplication to obtain maximum speed and memory efficiency. On the other hand, when designing an etic file to work on a stand-alone basis, include everything that normally goes into the terminfo file. The contents of a terminfo can be redirected into another file after decompiling it with infocmp or the etic program using the decompile option. For example: /usr/angoss/bin/etic -i /usr/lib/terminfo/a/ansi > example.tic Note that the infocmp utility is not available on all operating systems. General Information about ETIC and TERMINFO Files Here are some important points to remember when you are editing either terminfo or etic files: White spaces, comments, and other indentation formats may be used to organize the source code and increase readability. Comments are indicated by using the pound sign (#) and may start anywhere on a line, ter- minated by the end of the line. Individual values are separated by commas. Even the last entry must end with a comma. To symbolize an escape character, use a backslash capital E (\E). To enter control characters, use ^. ^A for example. To insert a literal ^, use \^. The first line is an identifier of the supported terminals followed by a description. Terminal names are separated by | characters with the description as the last item. For example: ansi|ansic|ansi80x25|Ansi standard console An ansi file will be created as a result of the compile. Then ansic and ansi80x25 are created by linking to this - thus, all three terminals will behave identically. Special SmartWare command words are preceded with a left brace ({). Special Entries for SmartWare This section describes special SmartWare entries that apply to etic files only. Entry Description {cmap Used to remap a PC character to an appropriate character. The syntax is: {cmap=\d1\d2, Where: d1 is a PC decimal character and d2 is a terminal character to Substi- tute Note that if d is not used, characters are in Octal. Refer to the Relevant PC Characters table to determine PC characters. Refer to the terminal's manual for substitutions. Alternatively, to display the termi- nal character set, run the SmartWare spreadsheet module, enter the formula chr(row) and copy it down to row 255. Note that on some terminals, certain high characters cause the terminal to switch modes or causes other interest- ing side effects. {delay Instructs SmartWare to change the default key wait time. In order to opti- mize performance when SmartWare is idle, it will pause for half a second while waiting for a keystroke. This avoids needless looping which would have an adverse affect upon other users. To modify the key wait time, insert the following line in the .tic file: {delay#t, Where: t is the time in tenths of a second {escdelay Sets the time, in 10ths of a second, that a lone escape character actually means escape. In SmartWare, the escape key operates as both a lead-in key and an escape key. This is accomplished by placing a delay after the escape key is pressed. If no other key is pressed within a certain length of time, the key press is interpreted as an escape. This permits users to define escape on their terminal - rather than using Ctrl C - while at the same time not having the software confuse it with other sequences the terminal might send. The default value is 10 (one second), the maximum is 255. A value of 0 will result in unusual, system-dependant behavior - the most likely result will be: terminal keyboard sequences work fine, but the escape function does not. {k Overrides the default keystroke settings. The syntax is: {k=