Put your logo here!

TOC PREV NEXT INDEX



7

Tek220 and Tek340 Emulators

The Tek220 and Tek340 emulators can be opened through a Telnet, Cterm, Llogin, or Serial session. (The Tek340 emulator requires an authorization key.) The emulators are not linked directly to Telnet, Cterm, Llogin (i.e., LAT), or Tip and therefore download faster, require less memory, and can run multiple emulator sessions at once.

The Tek220 and Tek340 emulators support color text as well as foreground and background color. You can apply a color to bold, blinking, selected, and reversed text. In the Tek340 emulator, using ReGIS graphics and the supplied setup screens, you can adjust the color of graphics by changing any of the 16 color table entries. The Tek340 emulator also supports Tektronix 4010 and 4014 vector graphics.

This section presents the following information about the Tek220 and Tek340 emulators:

Note: The Tek340 emulator requires an authorization key. Refer to the Authorize command in Chapter 4, Boot Monitor.

Starting a Tek220 or Tek340 Emulator

Tek220 and Tek340 sessions can be started several ways:

xpsh -display nc_address:0 tek220 -e telnet
xpsh -display
nc_address:0 tek340 -e cterm

Using Emulators

When you start an emulator, the window displays as shown in Figure 7-1.

Figure 7-1 Sample Emulator Window

These elements are part of the emulator window:

File Menu

The File menu has four commands: Reset, Start Script, Abort Script and Quit.

Reset Command
This command resets the emulator window settings to the default settings.
Start Script Command
This command automatically loads and runs a script created in the scripting language. For details, refer to Executing a Script.
Note: To execute a script, it must be in the correct script directory. For UNIX, this is /tekxp/boot/config/script. For NT and Windows 2000 hosts, it is \tekxp\boot\config\script . The VMS location for the script is TEK$XP_CONFIG:. The script name must appear in the script_files file in the same directory.
Abort Script Command
This command stops a script that is currently running.
Quit Command
The Quit command closes the emulator window and exits the session.

Settings Menu

The Settings menu provides these commands:

Emulation Command

The Emulation command displays the Emulation dialog box containing the Emulation and DA Response fields.

Emulation

This field provides a way to start these additional emulator sessions:
Table 7-1 Emulator Sessions
Emulator Setting
Description
VT220, 8-bit
VT340, 8-bit
Starts a VT220 or a VT340 emulator that sends 8-bit control sequences.
VT220, 7-bit
VT340, 7-bit
Starts a VT220 or VT340 emulator that sends 7-bit control sequences. This type of emulator can receive either 7- or 8-bit sequences. This is the default emulator.
VT100
Starts a VT100 emulator. This emulator does not accept VT200 or VT340 level escape sequences.
VT52
Starts a VT52 emulator.
Tek4010/4014
(Tek340 only) starts a Tek340 emulator that supports Tektronix 4010/4014 vector graphics.

DA Response

The DA Response field is used to specify the emulator's response to a device attribute request, also known as the terminal ID. This tells the host specific operating characteristics of the network computer. Specify one of these responses: VT340, VT240, VT220, VT102, VT101, or VT100. (Available options are different for the Tek220 and Tek340 emulators.)

User Features Command

The User Features command displays the User Features dialog box containing the options shown in Table 7-2.
Table 7-2 User Features
Option
Description

Online

Specifies whether the emulator accesses the host (On), or is local to the network computer (Off). Default is On.

Local Echo

Specifies whether keyboard data is sent to the host only and the host sends the echoed characters (Off), or whether the keyboard data is sent to both the host and the local emulator (On). If turned on, double characters are echoed on your display. Default is Off.

Application Keypad

Specifies what characters are sent from keypad key presses. If turned off, the default keypad characters are sent. If turned on, application control sequences are sent. Default is Off.

Application Cursor Keys

Specifies whether arrow keys send standard ANSI cursor control sequences (Off), or send application control sequences (On). Default is Off.

Scroll Bar

Specifies if the scroll bar is present in the emulator window. Default is On.

Reverse Video

Specifies whether the emulator's default foreground and background displays in reverse video. This setting does not affect text with
non-default colors. Default is Off.

Auto Wrap

Specifies whether a new line is automatically started when text reaches the end of the column. If turned Off, the last character on a line is overwritten with the next character. If turned on, a new line is created. Default is On.

New Line

Specifies what happens when the Enter key is pressed. If On, pressing Enter sends a carriage return and a line feed. If Off, pressing Enter sends a carriage return only and the cursor is not moved to a new line. Default is On.

Lock User Features

Specifies whether the host can change user features, such as tab settings. If On, the host cannot change user features; if Off, the host can change user features. Default is Off.

Lock User Defined Keys

Specifies whether the host can change user-defined keys. If On, the host cannot change user-defined key functions; if Off, the host can change user-defined keys. Default is Off.

Resize Command

The resize command allows you to select the number of rows and columns used. The default is 24 rows by 80 columns.

Color Command

The Color command (on color Tek340 terminals only) displays the Color dialog box. You can use the options in this box to adjust the 16 colors tables used in color text, and ReGIS graphics, and Sixel graphics. Tables 0 through 7 are used for color text; tables 8 through 15 are used for graphics.

To adjust a color, pick the color table, and adjust the amount of red, green, and blue that displays. Click on the slider box and move horizontally to adjust the color. You can adjust as many of the color tables that are represented in the graphic or window. Click OK when finished.

Specifying Client Resource Settings

Resource settings can be specified for Tek220 and Tek340 sessions. The resource settings can be set on the xpsh command-line, in the Client Launcher configuration file (system.launcher by default), or in one of the files listed below. The resource settings are read in the following order when started with xpsh, with the last file taking precedence over the first:

For UNIX hosts:

For VMS hosts:

For Windows NT hosts:

Note: For Windows NT, use the xpsh access method:
xpsh -access xpsh tek220 -e telnet
Specifying a Resource

A resource definition is generally composed of three parts (not all are required):

Each resource is specified on a separate line. For in-depth information about X resources, refer to the X Window System documentation.

For example, this X resource sets the default background color to light grey for all Tek220 and Tek340 windows:

Tekterm*background:light grey

This example sets the background color to blue for the Tek340 application only, overriding the previous example:

tek340.background:blue

The resource attributes and command-line arguments listed in Table 7-3 can be set in one of the resource files or as part of the xpsh command-line.
Table 7-3 Resource Settings 
Resource Name
Command-Line Argument
Specifies
none
-xrm <resource string>

A resource string to be used.

foreground
-fg

Foreground color of the client. Default is black.

background
-bg

Background color of the client. Default is white.

shareColors
none

Whether to allocate ReGIS colors exclusively to the emulator (True) or not (False). Default is False.

needPlanes
none

Whether to try and allocate 4 planes in the color map to accurately emulate a VT340. Default is False.

holdLED
-holdLED <led>
The LED to be used when the HoldScreen key is pressed. Allowable values are none, default or an LED number from 1-32. Default is none.
clearRootWeave
none
Whether to set the root window to black on startup. Default is False.
centerOnRoot
none
Whether to position the window in the center of the screen regardless of geometry option. Default is False.
reverseANSIColors
none
Whether to display ANSI colors normally or reverse-color.
printOptions
-printOptions <options>
Specifies the options to be passed on to the "lpr" command.
saveColorsToRMS
none
Whether to save color resources to the server data base when set in the Color dialog. Default is False.
doubleClick
-dc
Whether to support double clicking to select a word. Default is False.
scrollBar
-sb or +sb
Whether to display a scroll bar. Default is True (-sb)
scrollBarOnRight
-sr
Whether to display the scroll bar on the right side of the window. Default is False.
telnet.script

Specifies the name of the script to start when invoked with a telnet session.
tip.script

Specifies the name of the script to start when invoked with a tip session.
saveLines
-sl <number>
Specifies the number of lines to save that have been scrolled off the top of the screen.
service
-services
 specifier
(For LAT sessions) Specifies a particular service to use. Specifier can be:
blank shows all services
service name shows a particular service
node=service-node-name shows all services
  advertised by a particular service-node
service-name/node=service-node-name shows a
  particular service on a particular service-node
permanent
-p
(For LAT sessions) Permanent specifies that the LAT
session connects to and re-connects to a particular
service even after logging off.
cursorColor
-cr

Color of cursor. Enter color, or standard X color specification.

  
-name

Application name with regard to the resources set. Use this when starting multiple sessions that you want configured differently.

boldColor
-boldColor color

Color used for text marked bold.

selectColor
-selectColor color

Color used to indicate selected text.

blinkCursor
 

Specifies whether the cursor blinks. Set the resource to True for a blinking cursor, or False for a non-blinking cursor.

blinkColor color
-blinkColor color

Color assigned to blinking characters. When this resource is set, the characters display in the specified color and do not blink.

reverseColor color
-reverseColor color

Color assigned to reverse-video characters. Those characters are reversed and then displayed in the specified color.

color.0 through color.15
none

The color associated with the numbers 0 through 15.

bg0Fg7
none

(Tek340 only) Color 0 is the background, color 7 is the foreground. Use the color.0 through color.15 command to specify the colors used.

printer
-Pprintername

The printer to be used.

iconic
-iconic

The emulator starts with the window iconified.

geometry
-geometry

Geometry specification of the client. Default is 80x24.

title
-T or -title

Title of the client as shown by the window manager.

font.normal
-fn

Standard 80 column font. Default is LuciV2RT12.

font.normalWidea
-fnw

Double-wide version of standard font. Default is tekdw80.

font.normalBottoma
-fnb

Double-wide, double-high version of the standard font (bottom half). Default is tekdwdhb80.

font.normalTopa
-fnt

Double-wide, double-high version of the standard font (top half). Default is tekdwdht80.

font.condensed
-fc

Standard 130-column condensed font. Default is LuciV2NT12.

font.condensedWidea
-fcw

Double-wide version of the condensed font. Default is tekdw132.

font.condensedBottoma
-fcb

Double-wide, double-high version of the condensed font (bottom half). Default is tekdwhb132.

font.condensedTopa
-fct

Double-wide, double-high version of the condensed font (top half). Default is tekdwht132.

iconName
-n

The name that displays at the bottom of an icon when a window is iconified.

displayMenuBar
 

Specifies whether the menubar displays at the top of the emulator window.

a The double-wide versions of the normal and condensed fonts must be the same height as the font, and double the width.
Examples

This example opens a Telnet window titled Sam's Window on a network computer named Sierra:

xpsh -display sierra:0  tek220 -T "Sam's Window"\ -e telnet

This example opens a Telnet window on a Tek340 terminal emulator on the network computer named Spruce with these attributes: white foreground, black background, located 30 pixels in each direction from the lower right corner, and titled Telnet:

xpsh -display spruce:0 tek340 -fg white -bg black\ -geometry -30-30 -T "Telnet" -e telnet

Keyboard Translation Settings

In addition to the resource settings, keyboard translations can be set in the .Xdefaults file to override the predefined action for a key. The keyboard translations act as macros, redefining and binding a sequence of ASCII characters or an escape sequence to a key press. The keyboard translation syntax is a subset of the X toolkit Translation Manager syntax, supporting only keypress events, designated as <Key>.

Terminal emulators have a predefined action for most keys on the keyboard (most often, an ASCII character or an ASCII escape sequence). For example, when you press the A key, an a is sent. Pressing the F6 key on a VT220 keyboard, sends Escape [ 1 7 ~. Some keys, however, may have no predefined action.

Each key press can be bound in these ways:

Specifying a String Action Example

For string actions, the ASCII character is one number in the range 0-255 decimal. Numbers can be decimal, octal, or hex. Enter printable characters (such as numbers or letters) in double quotation marks.

This example shows a translation table for a log-in keyboard macro with the Tek340 emulator:

tek340.translations: #override \
Key>F5: string("joe") string(0xa) \n\
Key>F6: string("vt220") string(0xa) \n\
Key>F7: string("DECWRITE") string(0xa)

The override argument must be given at the beginning of the keyboard macro. Pressing the F5 key enters the user name joe and a line feed. Pressing the F6 key sets the terminal type as vt220 and enters a line feed. Pressing the F7 key starts the DECWrite application. Using this example, three key presses log you in and starts an application.

Securing the Keyboard Example

The secure() setting directs all keyboard actions to a specified Tek220 or Tek340 emulator window regardless of where the cursor is positioned on the display. To use the secure function, you must first define a key to invoke the secure function. In these examples, the F6 key invokes the secure function on Tek220 and Tek340 emulator windows.

tek220.translations: #override <Key>F6: secure()
tek340.translations: #override <Key>F6: secure ()

Printing Example

This example sets the shifted keypad 8 key to perform a print screen showing ASCII characters only with no character attributes:

Shift<Key>KP_8: print()

To print to a DEC printer using the shifted keypad 8 key, showing character attributes such as bold, underline, and character width and height, enter:

Shift<Key>KP_8: print("DEC")

Note: There is a limit of one X event per translation. An X event represents one key, or one key Shifted. For example, each X event in the first example above is carried out by pressing a single key (F5, or F6, or F7). The Setup example uses the Shift and keypad 7 keys. For more information about translations, refer to the xterm man page.

Specifying Keyboard Translation Modifiers

Keyboard translation modifiers precede the event specification. For example, in the following line, Ctrl is the modifier, Key is the X event, F1 is the key that is pressed, and print is the action:

Ctrl <Key> F1: print()

This example means that pressing and holding the Control key and then pressing the F1 key causes a print action.

If a modifier is immediately preceded by a tilde character (~), it specifies that the modifier must not be pressed. A list of modifiers can also be preceded by an exclamation point (!) which specifies that pressing only the specified modifiers causes the action.

For example, to specify that the Alt key must be pressed and that the Shift key must not be pressed, the tilde is placed in front of Shift:

Alt ~Shift <Key> F7

To specify that the Control and Alt keys must be pressed and that no other modifiers can be pressed, the exclamation point is placed at the beginning of the line:

! Ctrl Shift <Key> F5

Table 7-4 lists the supported keyboard translation modifiers.
Table 7-4 Supported Keyboard Translation Modifiers
Modifier
Description
Modifier
Description
None
No modifiers or buttons
Mod5
Mod5 modifier bit
Any
Any modifiers or buttons
Meta
Meta key modifier
Ctrl
Control modifier bit
Hyper
Hyper key modifier
Shift
Shift modifier bit
Super
Super key modifier
Lock
Lock modifier bit
Alt
Alt key modifier
Mod1
Mod1 modifier bit
Button1
Pointer button 1
Mod2
Mod2 modifier bit
Button2
Pointer button 2
Mod3
Mod3 modifier bit
Button3
Pointer button 3
Mod4
Mod4 modifier bit
 
 

The Meta, Hyper, Super, and Alt modifiers are useful only if a modifier bit 1 through 5 is bound to a key with that name. (Use xmodmap to map keys.)

For example, to find out which modifier bits are free:

xmodmap -pm

To bind the Hyper key to the PF4 key on the VT keyboard:

xmodmap -e "keysym KP_F4 = KP_F4 Hyper_L Hyper_R"

To bind the Hyper key to modifier bit 4 (mod4):

xmodmap -e "add mod4 = Hyper_L"

Specifying Visual Character Attributes

To specify a character attribute, use the numbers in the table below. The Ps values are ANSI values that represent a visual attribute. You can specify multiple Ps values, and they are applied in the order given.

Character attributes are entered using this syntax:

CSI Ps ; Ps m

where CSI is the control character (whose decimal value is 155), and Ps is the attribute number. Separate multiple attributes with a semicolon. In this example, text is displayed as bold:

CSI 1 m

In this example, text is displayed as bold, blinking, and underlined:

CSI 1;5;4 m

In this example, the display background is blue, and the foreground is yellow:

CSI 44;33 m

After you enter an attribute, the emulator applies that attribute to all new characters received. Table 7-5 lists the available character attributes:
Table 7-5 Available Character Attributes
Ps
Attribute
Ps
Attribute

0

All attributes off

33

yellow foreground

1

Bold

34

blue foreground

4

Underline

35

magenta foreground

5

Blinking

36

cyan foreground

7

Negative image

37

white foreground

8

Invisible

40

black background

22

Bold off

41

red background

24

Underline off

42

green background

27

Negative image off

43

yellow background

28

Invisible off

44

blue background

30

black foreground

45

magenta foreground

31

red foreground

46

cyan foreground

32

green foreground

47

white foreground

Setting ttys for Tek220 Sessions

Telnet, Cterm, and LAT sessions all use a VT220 terminal emulator. If you have applications that use DEC multinational extended character sets, you need to turn on 8-bit mode. The escape sequence commands change between 7-bit and 8-bit mode. To configure ttys for 8-bit mode:

# stty tabs cs8 -parenb -istrip

tabs accepts tab characters without converting them to spaces

cs8 turns on 8-bit character sequences

-parenb turns off parity

-istrip turns off stripping off the high bit

The pass8 parameter can be substituted for cs8, -parenb, and -istrip:

# stty tabs pass8

TOC PREV NEXT INDEX