4.4. Character Applications

This section describes how to configure character application objects. Terminal emulator mappings are also discussed.

This section includes the following topics:

4.4.1. Configuring Character Application Objects

You use a character application object if you want to give a VT420, Wyse 60, or SCO Console character application to users.

In the Administration Console, the configuration settings for character application objects are divided into the following tabs:

  • General tab – These settings control the name and the icon used when creating links for users

  • Launch tab – These settings control how the application is started and whether application sessions can be suspended and resumed

  • Presentation tab – These settings control how the application is displayed to users

  • Performance tab – These settings are used to optimize the performance of the application

  • Client Device tab – These settings control how the user's client device interacts with the application

The following table lists the most commonly used settings for configuring character application objects and how to use them.

Attribute

Description

Name

The name that users see.

Icon

The icon that users see.

Application Command

The full path to the application that runs when users click the link.

The application must be installed in the same location on all application servers.

See also Section 4.8.9, “Configuring VMS Applications” for details of how to configure Virtual Memory System (VMS) character applications.

Arguments for Command

Any command-line arguments to use when starting the application.

Connection Method

The mechanism SGD uses to connect to the application server, for example ssh or telnet.

Number of Sessions

The number of instances of an application a user can run. The default is three.

Application Resumability

For how long the application is resumable. The following options are available:

  • Never – The application can never be resumed

  • During the User Session – The application keeps running and is resumable until the user logs out of SGD

  • General – The application keeps running for a time, controlled by a timeout value, after the user logs out of SGD, and can be resumed when the user next logs in

Window Close Action

What happens if the user closes the main application window using the Window Manager decoration. This attribute only applies for applications that use an Independent Window.

Window Type

How the application is displayed to the user.

If Independent Window is selected, you must specify a Height and Width for the Window Size or select the Client's Maximum Size check box.

Specify the number of Columns and Lines to display in the terminal window.

Emulation Type

The type of character application to emulate. SGD supports VT420, Wyse 60, or SCO Console character applications.

Terminal Type

The application's terminal type. Accept the default terminal type, or type you own type in the Custom field.

Application Load Balancing

How SGD chooses the best application server to run the application.

See Section 7.2.3, “Application Load Balancing” for more details.

Hosting Application Servers tab

Use the Editable Assignments table to select the application servers, or group of application servers, that can run the application.

The application must be installed in the same location on all application servers.

Assigned User Profiles tab

Use the Editable Assignments table to select the users that can see the application. Selecting Directory or Directory (light) objects enables you to give the application to many users at once. You can also use an LDAP directory to assign applications. See Section 3.2.2, “LDAP Assignments”.

To use and display the euro character, the terminal session must be capable of displaying 8-bit characters. To ensure this, enter the command stty -istrip. Also, the client device must be capable of entering the euro character.

4.4.1.1. Creating Character Application Objects on the Command Line

On the command line, you create a character application object with the tarantella object new_charapp command. You can also create multiple character application objects at the same time with the tarantella object script command. See Section 3.1.5, “Populating the SGD Organizational Hierarchy Using a Batch Script”.

Character application objects can only be created in the o=applications organizational hierarchy.

4.4.2. Terminal Emulator Keyboard Maps

The SGD terminal emulators associate keys on the user's client keyboard with keys found on a real terminal. For each type of terminal emulator: SCO Console, Wyse 60, and VT420, there is a default keyboard mapping.

To change the default mappings or define additional mappings for a particular application, you can specify your own keyboard map file using an object's Keyboard Map attribute.

4.4.2.1. Default Mappings

The emulators have built-in keyboard maps, which are equivalent to the following sample keymap files in the /opt/tarantella/etc/data/keymaps directory:

  • ansikey.txt – For the SCO Console emulator

  • vt420key.txt – For the VT420 emulator

  • w60key.txt – For the Wyse 60 emulator

Note

Modifying these keyboard maps does not alter the default mappings used by SGD. The only way to do this is to specify a keyboard map using the character application object's --keymap attribute.

4.4.2.2. Creating a Keyboard Map

To create your own keyboard map, make a copy of one of the sample keyboard map files, and modify it to suit your application. You can modify a keyboard map in any text editor.

The format of a mapping is:

ClientKeys=Translation

Where ClientKeys is the key, or keys, that the user presses on the client device, and Translation is the keystroke, or keystrokes, sent to the application on the application server. For example:

PageDown=Next

With this mapping, when the user presses the Page Down key the emulator sends the keystroke Next to the application server.

If a particular key has a user-defined mapping, the default settings are overridden. If no user-defined mapping is present, the default mapping is sent to the application server.

You can send complete strings on a single key press, by surrounding the string in straight quotation marks. For example:

F1="hello world"

To enter non-printable characters when mapping strings, use the code shown in the table below:

Code

Meaning

\r

Carriage return

\n

Line feed

\"

Straight quotation marks

\e

Escape

\t

Tab

\nnn

The character with octal value nnn

\xHH

The character with hex value HH

To specify modifier keys, such as Shift, Control, and Alt, in a mapping, separate the keys with the plus sign, +. For example:

Shift+NUMLOCK=INSLINE
Shift+F1="\0330a"
Alt+Shift+Control+DELETE="\003[33~"

To specify your own keyboard map for a character application, use the following command:

$ tarantella object edit --name obj --keymap keymap

where obj is the character application object and keymap is the path name of a keyboard map file.

You can use a full path name or a relative path name. Relative path names are relative to the /opt/tarantella/etc/data/keymaps directory.

For example, the following example uses the named keyboard map, which is stored in /opt/tarantella/etc/data/keymaps.

$ tarantella object edit --name obj --keymap mykeymap.txt

4.4.2.3. Key Names

The following are lists of key names that are valid in SGD keyboard maps. The Section 4.4.2.4, “Client Device Keys” list shows the key names that represent keys on the user's client device. These are the keys that can be mapped to the emulator key names given in Section 4.4.2.5, “Application Server Keystrokes”, which are the keystrokes ultimately sent to the application on the application server.

Note

The default mappings between these key names are as found in the keyboard maps supplied with SGD. If a key is not in a keyboard map, then it is not mapped.

4.4.2.4. Client Device Keys

SGD supports the following keys on the user's client device:

  • CURSOR_DOWN

  • CURSOR_LEFT

  • CURSOR_RIGHT

  • CURSOR_UP

  • DELETE

  • END

  • F1 to F12

  • HOME

  • INSERT

  • KP0 to KP9

  • KPADD

  • KPDELETE

  • KPDIVIDE

  • KPENTER

  • KPMULTIPLY

  • KPSUBSTRACT

  • NUMLOCK

  • PAGEDOWN

  • PAGEUP

4.4.2.5. Application Server Keystrokes

The following application server keystrokes are supported for SCO Console applications:

  • CURSOR_DOWN

  • CURSOR_LEFT

  • CURSOR_RIGHT

  • CURSOR_UP

  • DELETE

  • END

  • F1 to F12

  • HOME

  • INSERT

  • KP0 to KP9

  • KPADD

  • KPDIVIDE

  • KPDOT

  • KPMULTIPLY

  • KPSUBSTRACT

  • NUMLOCK

  • PAGEDOWN

  • PAGEUP

The following application server keystrokes are supported for VT420 applications:

  • CURSOR_DOWN

  • CURSOR_LEFT

  • CURSOR_RIGHT

  • CURSOR_UP

  • F1 to F20

  • FIND

  • INSERT

  • KP0 to KP9

  • KPCOMMA

  • KPDOT

  • KPENTER

  • KPMINUS

  • NEXT

  • PF1 to PF4

  • PREV

  • REMOVE

  • SELECT

The following application server keystrokes are supported for Wyse 60 applications:

  • CLRLINE

  • CLRSCR

  • CURSOR_DOWN

  • CURSOR_LEFT

  • CURSOR_RIGHT

  • CURSOR_UP

  • DELCHAR

  • DELETE

  • DELLINE

  • F1 to F16

  • HOME

  • INSCHAR

  • INSERT

  • INSLINE

  • KP0 to KP9

  • KPCOMMA

  • KPDELETE

  • KPENTER

  • KPMINUS

  • NEXT

  • PREV

  • PRINT

  • REPLACE

  • SEND

  • SHIFTHOME

4.4.3. Terminal Emulator Attribute Maps

Terminal emulator attribute maps enable you to change how character attributes such as bold or underline are displayed in the SGD terminal emulators. For example, you can specify that text that normally appears bold and underlined appears red in the SGD terminal emulators, but not red and bold and underlined.

SGD provides a default attribute map /opt/tarantella/etc/data/attrmap.txt. This maps character attributes to the logical color Color_15 (white). You can also create your own attribute map.

4.4.3.1. How to Create Your Own Attribute Map

  1. As superuser (root), create a copy of /opt/tarantella/etc/data/attrmap.txt to work on.

  2. Edit the new file, so that character attributes map to your chosen colors.

  3. Use the name of the file for the application object's Attribute Map attribute.

4.4.3.2. Editing Character Attributes

The SGD attribute maps enable you to map the following attributes:

  • Normal

  • Bold

  • Dim

  • Blinking

  • Underline

  • Inverse

To map combinations of attributes, separate the attributes with the plus sign +, for example, Bold+Underline.

To display colors in the terminal emulators, SGD maps logical colors to RGB values. For example, the logical color Color_9 maps to the RGB value 128 0 0 (red).

When mapping attributes to colors in your attribute map, specify the logical color name. For example:

  • To change bold underlined text to red text:

    Bold+Underline=Color_9
  • To change inverse blinking text to light red text:

    Inverse+Blinking=Color_1

For a complete list of logical color to RGB value mappings, refer to the comments in attrmap.txt.

You can change the default color mappings by editing the color map used by the terminal emulators. See Section 4.4.4, “Terminal Emulator Color Maps”.

Note

Wyse 60 terminals display only black and white colors. However, you can use the SGD Wyse 60 terminal emulator to display colors in your Wyse 60 applications. You can do this by using the attribute map to map character attributes in the Wyse 60 application to colors.

4.4.4. Terminal Emulator Color Maps

SCO Console (ANSI) and VT420 terminals support 16 colors. The SGD terminal emulator uses a color map to determine how these colors are presented in an application session.

Note

Wyse 60 terminals are monochrome. You can only switch the background and foreground colors, black and white, using the color map. However, you can map character attributes such as bold or underline to any of the 16 logical colors supported by the terminal emulator. See Section 4.4.3, “Terminal Emulator Attribute Maps”.

The color map maps the logical colors Color_0 through to Color_15, inclusive, to colors and the RGB values that SGD uses to represent those colors. The default mappings are as follows:

Logical Color

Terminal Color

RGB Value Used by SGD

Color_0

Black

0 0 0

Color_1

Light red

255 0 0

Color_2

Light green

0 255 0

Color_3

Yellow

255 255 0

Color_4

Light blue

0 0 255

Color_5

Light magenta

255 0 255

Color_6

Light cyan

0 255 255

Color_7

High white

255 255 255

Color_8

Gray

128 128 128

Color_9

Red

128 0 0

Color_10

Green

0 128 0

Color_11

Brown

128 128 0

Color_12

Blue

0 0 128

Color_13

Magenta

128 0 128

Color_14

Cyan

0 128 128

Color_15

White

192 192 192

To alter the defaults for a particular application, create your own color map, and specify it in the application object's Color Map attribute.

A default text-format color map /opt/tarantella/etc/data/colormap.txt is provided.

4.4.4.1. Examples of Using Color Maps

  • To make the color red brighter, change the RGB setting of Color_9 to 192 0 0.

  • To change items that appear in light green to appear yellow, change the RGB setting of Color_2 to 255 255 0, the RGB value of yellow.

  • One common color change is to switch the foreground and background colors between black and white. When you do this, you are not changing the foreground or background color as such, you are changing the way black (Color_0) and white (Color_15) are displayed. Therefore, if your application has a white background and you want to change it to a black background, change the value of Color_15 to 0 0 0, the RGB value of black.