SCO Merge User's Guide
Appendix B, Using remote terminals

Appendix B

Using remote terminals


Table of Contents

SCO Merge works from a variety of displays other than the UNIX system console. This appendix covers the differences in using SCO Merge from the system console and from the following types of remote terminals:

X terminals

You can run DOS and Microsoft Windows programs from remote X servers (also called X terminals or X workstations) just as you do from the Desktop on your local system console. (To run Windows in a window on any X display, you must have already installed the SCO Merge Windows/X driver as described in ``Basic installation for Windows/X display'' in Chapter 2.)

When SCO Merge is installed, it configures the X server for your system console so that you do not have to do any special configuration. When you use an X terminal or X workstation, you have to do some of these things yourself. Also, there is some reduced functionality when an X server is not used on the console on the system where your SCO Merge session is running. The issues are:

SCO Merge PC fonts

When SCO Merge is run remotely, all the PC fonts it uses for character mode display need to be installed on the remote X server. If these fonts are not installed, alternates are used, but you may see funny characters, because standard X fonts do not have all the PC characters available.

The SCO Merge PC font files are in the directory /usr/lib/merge/xc/fonts. These font files are in bdf format and must be compiled and installed according to the instructions for your X display server.

Keyboard mappings

When running SCO Merge remotely from an X terminal, a mapping needs to be established between the keyboard codes of your terminal and PC scancodes.

The mappings are defined in special files with extension .xcode located in /usr/lib/merge/xc directory. The file xcode.readme in that directory lists mapping files provided with SCO Merge.

To use a particular mapping file, a special X resource needs to be defined. For example, to use a mapping file named hp.enw.xcode, set the X resource as follows:

dos*xcodetable:		/usr/lib/merge/xc/hp.enw.xcode

SCO Merge uses a generic mapping file to translate X codes to PC scancodes if no mapping file is specified. If this generic mapping is not sufficient for your X terminal, a warning message will be displayed in the status area of your DOS or Windows window and certain keys may not work correctly. In this case you can create custom mapping files.

Setting the XMERGE environment variable

When the XMERGE environment variable is set in your UNIX environment, you do not have to use the +x option when you start a SCO Merge session from the UNIX prompt. When you use the SCO UNIX desktop, XMERGE is set automatically. Therefore, when you are using some other X server, you should set this environment variable so it operates in the same manner.

In addition, the value you give XMERGE determines the default display capability for your DOS or Windows session. For remote X servers, you typically set XMERGE to cga, mda, or herc because SCO Merge can support these display modes in an X window. There is an exception to this: MS-DOS running under Windows 95 requires that the display type be vga even if it does not actually make use of VGA graphics. So, if you are using Windows 95, you should set XMERGE to vga. But, be sure never to run a DOS application that will try to use resolution VGA graphics because VGA graphics are not supported in an X window.

To set the XMERGE variable, use the following commands:

Bourne or Korn shell:

    XMERGE=displaytype
    export XMERGE
C shell:
    setenv XMERGE displaytype
where displaytype is cga, mda, herc, or vga.

No VGA graphics

High resolution VGA graphics for DOS applications are not available in an X window. VGA graphics are only available on the local VGA console via the zoom operation. If your DOS application tries to switch to VGA graphics, SCO Merge displays a message that VGA graphics are not available in a window. If this happens, all you can do is exit your session.

PC scancode terminals

Setting up PC scancode terminals

SCO Merge supports PC scancode terminals that can be switched between character and scancode modes under software control. These terminals are referred to as switchable scancode terminals. Wyse® Technology's Wyse 60 and Kimtron® Corporation's Model KT70/PC terminals are examples of switchable scancode terminals. SCO Merge automatically switches scancode terminals into character mode when they communicate with the UNIX system and into scancode mode when they communicate with DOS.

You can use the special scancode terminal support built into the SCO UNIX system. For OpenServer systems, refer to ``Installing scancode compatible terminals'' in your SCO OpenServer Handbook for instructions for setting up your scancode terminal.

Alternatively, you can set up a scancode terminal by following these procedures:

  1. Configure your scancode terminal to use eight data bits and one stop bit, no parity, and 25-line display mode.

  2. Configure the terminal to use normal character (ASCII) mode by default (SCO Merge switches these terminals to scancode mode automatically when necessary):

  3. Attach your terminal to any available serial line on your computer. Make sure the serial line is configured for eight data bits, one stop bit, and no parity.

  4. Redefine your TERM environment variable appropriately for the terminal you are using:
Refer to the manual for your terminal for more information on these procedures.

(If you need to set up a terminfo description of a scancode terminal, see Appendix C, ``Serial terminal information'' for information about the terminfo descriptions that SCO Merge requires in order to handle a scancode terminal correctly.)

Using PC scancode terminals

You can run any monochrome DOS application on a PC scancode terminal with the following limitations:

Serial terminals

Setting up serial terminals

No special procedures are required to set up serial terminals for use with SCO Merge. Simply follow the terminal manufacturer's and UNIX procedures for setting up the terminal for standard UNIX use.

The procedures require physically attaching the terminal to a serial port in your system unit and making sure the UNIX TERM environment variable is set correctly for anyone who uses the terminal. You may also need to modify entries in your terminfo file (see Appendix C, ``Serial terminal information'' for a more detailed description).

Using serial terminals

Serial terminals have the same limitations as PC scancode terminals. In addition, they typically have the following limitations:

Serial terminal keyboard mapping

PC keyboards contain keys not commonly available on standard serial terminals. Because DOS applications assume the presence of these keys, SCO Merge supplies a method of simulating the missing PC keys using an ASCII keyboard.

The following table shows the escape sequences that simulate these keystrokes on serial terminals.

 ------------------------------------------------------------------------
 PC key to simulate                     Escape sequence
 ------------------------------------------------------------------------
 Function keys: 
 <F1>                                   <Esc>1 
 <F2>                                   <Esc>2 
 <F3>                                   <Esc>3 
 <F4>                                   <Esc>4 
 <F5>                                   <Esc>5 
 <F6>                                   <Esc>6 
 <F7>                                   <Esc>7 
 <F8>                                   <Esc>8 
 <F9>                                   <Esc>9 
 <F10>                                  <Esc>0 
 <F11>                                  <Esc>; 
 <F12>                                  <Esc>: 
 Numeric keypad: 
 4 (left arrow)                         <Esc>F 
 6 (right arrow)                        <Esc>G 
 8 (up arrow)                           <Esc>T 
 2 (down arrow)                         <Esc>V 
 7 <Home>                               <Esc>H 
 9 <PgUp>                               <Esc>P 
 3 <PgDn>                               <Esc>Q 
 0 <Ins>                                <Esc>I 
 . <Del>                                <Esc>D 
 1 <End>                                <Esc>E 
 5                                      <Esc>.
 <Num Lock>                             <Esc>N 
 /                                      <Esc>& 
 *                                      <Esc>* 
 -                                      <Esc>- 
 +                                      <Esc>+ 
 <Enter>                                <Esc>^ 
 Shift type keys: 
 Left <Shift>                           <Esc>Z 
 Right <Shift>                          <Esc>/ 
 Left <Ctrl>                            <Esc>C 
 Right <Ctrl>                           <Esc><Shift>C 
 Left <Alt>                             <Esc>A 
 Right <Alt>                            <Esc><Shift>A 
 All shifts released                    <Esc><Space>
 Other special keys: 
 <Print Screen/Sys Rq>                  <Esc>R 
 <Scroll Lock>                          <Esc>S 
 <Pause/Break>                          <Esc>| 
 <Caps Lock>                            <Esc>K 
 <Sys Rq>                               <Esc>= 
 <Esc>                                  <Esc><Esc>
 102nd key on international keyboards   <Esc>< 
 10 cursor keypad keys: 
 <Ins>                                  <Esc><Shift>I 
 <Home>                                 <Esc><Shift>H 
 <PgUp>                                 <Esc><Shift>P 
 <Del>                                  <Esc><Shift>D 
 <End>                                  <Esc><Shift>E 
 <PgDn>                                 <Esc><Shift>Q 
 (left arrow)                           <Esc><Shift>F 
 (right arrow)                          <Esc><Shift>G 
 (up arrow)                             <Esc><Shift>T 
 (down arrow)                           <Esc><Shift>V 

To simulate PC keys listed in the left column of the chart, press keys listed in the right column of the chart.

For example, to simulate the PC numeric keypad <Home> key on an ASCII keyboard, press <Esc>H. To simulate the PC <F1> function key on an ASCII keyboard, press <Esc>1 .

In a DOS environment, the PC keyboard's <Ctrl>, <Alt>, and <Shift> keys are usually used in conjunction with another keyboard character. To simulate these multiple-keystroke key combinations on a serial terminal, enter the escape sequence for the first key (<Esc>C or <Esc>A or <Esc>Z), and then enter the escape sequence for the second key.

For example, to simulate the <Ctrl><F1> key sequence, you first press <Esc>C to simulate the Left <Ctrl> key; then, press <Esc>1 to simulate the <F1> function key.

The <Ctrl>, <Alt>, and <Shift> key simulations all work in this manner. The escape sequences for these three keys send the key-down (make) code to DOS. From the viewpoint of DOS, the key you are simulating remains down until you enter a keystroke that does not simulate <Ctrl>, <Alt>, or <Shift>.

For example, to simulate the common <Ctrl><Alt><Del> reboot key combination from an ASCII keyboard, enter the <Esc>C<Esc>A<Esc>D sequence.

In this example, <Esc>C simulates a depressed and held Left <Ctrl> key, <Esc>A simulates a depressed and held <Alt> key, and <Esc>D simulates the <Del> key. Since <Esc>D is the first key combination in this example that does not simulate <Ctrl>, <Alt>, or <Shift>, SCO Merge sends to DOS both the simulation of the <Del> key and the key-up (break) code for all three keys (<Ctrl>, <Alt>, and <Del>).

If the key combination you want to simulate ends with <Ctrl>, <Alt>, or <Shift>, you must end it with the <Esc><Space> sequence, which sends the key up (break) code for any <Ctrl>, <Alt>, or <Shift> keystrokes currently in effect. For example, to simulate the <Ctrl><Alt> key combination used to access the Sidekick® main menu, enter <Esc>C<Esc>A<Esc><Space>.

The escape sequence <Esc><Esc> sends a real DOS escape character from an ASCII keyboard.


NOTE: If your serial terminal has programmable function keys, you may set them up to generate single- or multiple-keystroke escape sequences that you use frequently. See the manual that accompanies your terminal for procedures.

In some cases, the function keys and arrow keys on a serial terminal are mapped to generate the proper PC-specific scancodes. This depends on the TERM setting for the type of terminal used.

Terminal control codes

Key combinations called control codes allow you to perform several useful functions on your serial terminal. These functions are necessary and work only when you are in the DOS environment or running a DOS program. The following chart lists the key combinations you use to perform these functions on remote terminals:
-----------------------------------------------------------------------
 Function         ASCII terminal      PC scancode terminal
-----------------------------------------------------------------------
 Kill session     <Esc><Ctrl>K        Left <Ctrl><Esc> Left <Ctrl>K 
 Shift screen     <Esc><Ctrl>U        Left <Ctrl><Esc> Left <Ctrl>U 
 Redraw screen    <Esc><Ctrl>R        Left <Ctrl><Esc> Left <Ctrl>R 
 Fork shell       <Esc><Ctrl>F        Left <Ctrl><Esc> Left <Ctrl>F 
Use these control codes as follows:

Kill session
If a DOS or Windows process becomes irrecoverably hung (for example, when <Ctrl> <Break> fails), use this key combination to kill the session.

Shift screen
On a 24-line display, this control code causes the screen to shift from displaying the lower 24 lines (the default) to displaying the upper 24 lines. Pressing this control code again shifts the screen back to the default display. This control code has no effect on a 25-line display or PC scancode display.

Redraw screen
If the DOS display is overwritten or corrupted, use this control code to redraw the screen.

Fork Shell
Use this key combination to start a new UNIX shell from the DOS environment. Terminate the UNIX shell and return to your original DOS session just as you would terminate a UNIX shell started from a UNIX prompt; that is, press <Ctrl>D or type exit.