18
QTerm
Quarterdeck's Terminal Emulation Program
In this chapter you will learn:
t	How and why to connect to a host on the Internet using terminal emulation.
t	How to define your terminal type on a remote host.
t	How to resolve common terminal emulation problems.
QTerm is Quarterdeck's terminal emulation program. QTerm lets you connect to specific computer systems on networks such as the Internet, and execute applications on those systems as though you were directly connected to them. Many Internet applications are designed for character-based terminals, instead of graphically-oriented systems such as Windows and the X Windows System. QTerm enables you to execute standard character-based applications. Other parts of Quarterdeck Internet Suite, such as the Quarterdeck Message Center and the Quarterdeck Mosaic browser, provide graphical access under Windows to applications such as electronic mail and the World Wide Web.
When using QTerm to connect to a computer system on the Internet, you are using a network communications protocol called telnet. Telnet lets you log in to computer systems that support TCP/IP (Transmission Control Protocol/Internet Protocol) and accept telnet connections. QTerm uses Microsoft's WINSOCK interface to establish TCP/IP connections to hosts on a network.
Why Use QTerm?
Character-based Internet applications provide access to many valuable resources. QTerm lets you execute these applications. Some of the more common character-based Internet applications that you may want to execute using QTerm are:
t	Archielets you look up information in databases stored on Internet computer systems, known as Archie servers. Archie servers run on various Internet hosts all over the world. Some of the more common Archie servers are archie.rutgers.edu (America), archie.sura.net (America), archie.cs.mcgill.edu (Canada), archie.funet.fi (Finland), archie.thdarmstadt.de (Germany), archie.ac.il (Israel), archie.wide.ad.jp (Japan), archie.twnic.net (Taiwan), and archie.doc.ic.ac.uk (United Kingdom).
t	Finger-lets you get information about a user on a specific computer system, or the list of users currently logged in on an Internet host. 
t	Gopherlets you locate and retrieve information from Internet computer systems, called Gopher servers. Gopher servers run on various Internet hosts all over the world. Some of the more popular Gopher servers in the United States are gopher.uiuc.edu and gopher.tc.umn.edu.
t	IRC (Internet Relay Chat)lets participating users exchange text-based messages. IRC sessions are the Internet equivalent of telephone conference calls.
t	Veronicaused with Gopher to simplify Gopher searches. Based on keywords that you provide, Veronica searches available gopher servers and builds a menu of the gopher servers that contain information that matches your keywords.
t	WAIS (Wide Area Information Server)lets you search databases located on WAIS servers using standard text queries. Some Gopher servers, such as mudhoney.micro.umn.edu, provide connections to WAIS servers.
t	Whoislets you query an online database that contains a directory of computer system administrators, computer domains, domain name servers, and computer (host) names. This command can be useful when you are trying to locate an individual or specific company on the Internet.
For more information on these and other applications that let you access information on the Internet, see their documentation or any of the third-party books that are available on the Internet. Books on the should be available at book or software stores in your area.
What You Need To Know Before You Use QTerm
To use QTerm, you must:
t	Have access to a host that can connect to the Internet. This can be though a connection to an Internet service provider using Quarterdeck Internet Suite's SLIP/PPP dialer application, through a LAN with a connection to the Internet, or through a direct Internet connection.
t	Know the network name (or IP address) of the host to which you wish to connect.
t	Know your login name and password on the host to which you wish to connect.
t	Know how to access the application you want to run or the commands you want to use.
Installing QTerm
For information on installing QTerm, see the included installation guide.
Starting QTerm
To start QTerm:
 u 	If you are using Windows 95, display the Start menu, then select Programs, Quarterdeck InternetSuite, and finally QTerm.
 u 	If you are using Windows 3.1, 3.11 or NT, double-click the QTerm icon in the Quarterdeck InternetSuite Program Group.
The QTerm window displays:

Figure 90: QTerm Window


 If you are running Quarterdeck Mosaic, you can also start QTerm by selecting Telnet from Quarterdeck Mosaic's Tools menu.
Executing QTerm Commands
QTerm provides two ways of executing commands:
t	By selecting the appropriate command from the QTerm menus.
t	By selecting an icon from QTerm's toolbar, located below the menu bar. You can enable or disable the toolbar by pulling down the Settings menu and selecting the Toolbar command from the Window dropdown menu. For more information on using the toolbar, see "Using QTerm's Toolbar" on page 229
Not all QTerm commands are available on the toolbar. The toolbar is designed to provide quick access to commonly-used QTerm commands.
Using Online Help
Online help is available in QTerm by selecting the help icon from the QTerm toolbar, or by selecting one of the commands available on the Help menu. Selecting the help icon on the toolbar is the same as selecting the Search for Help On command from the QTerm Help menu.
Connecting to a Host Computer Using Telnet
To connect to a host computer using telnet:
1	Select the Open Telnet Connection icon from the toolbar, or pull down the File menu and select Open Telnet Connection. 
The Open Telnet Connection dialog box displays:

Figure 91: Open Telnet Connection Dialog Box
2	Enter or select the target host name or IP address in the Host name or IP address field. 
The host name can be up to 64 alphanumeric characters and may include the @ and "." characters. Examples are -netmachine or netmachine.business.com or netmachine.university.edu.
If you enter an IP address, it must be of the form xxx.xxx.xxx.xxx, where each xxx is a number between 0 and 255.
3	To connect to the specified host using telnet, click the -Connect button. Unless you are testing your connection, you should always use the default Port name value of telnet. See QTerm's online help for an explanation of the other port names that are available.
You are connected to the specified host and are prompted to log in. 
4	Enter your login ID and password.
At this point, your login is complete, and you are connected to the specified computer system. You can execute any character-based application provided by that host by entering the name of the application, and pressing Enter.

Once you have established a telnet connection to a host, the name or IP address of that host will be added to the list of recently connections maintained by QTerm at the bottom of the File menu. If you want to reconnect to one of these hosts, you can select the name or IP address of that host from the file menu rather than using the Open Telnet Connection toolbar icon or menu command.
Defining Your Terminal Type
Once you have established a telnet connection to a computer system and have logged in, the remote system will usually prompt you for the type of terminal that QTerm is emulating. This is known as defining the terminal emulation mode you are using, or "defining your terminal type." Your terminal emulation mode must be correctly defined before you can successfully execute character-based applications such as Archie and Gopher. 
Many Unix systems will display a message like the following after you have typed your password:
Terminal Type (VT220):
In this message, the system is asking for your terminal emulation mode and suggests that you are using the VT220 terminal emulation mode. If this is correct, you can press the Enter key to accept the value of "VT220." If this is incorrect, you should enter the terminal emulation mode you are using, and press the Enter key. QTerm supports two types of VT220 terminal emulation, as well as VT100 and VT52 terminal emulation modes. All of these terminal emulation modes are named after the popular types of terminals from Digital Equipment Corporation (DEC) that they emulate.
The terminal emulation mode you select depends on the types of terminals that the remote computer supports. QTerm's terminal emulation modes are selected from the Terminal Emulation dropdown menu, found on QTerm's -Settings menu. (See the online help in QTerm for more information, under Changing QTerm's Settings.) 

If the output from an application on the remote computer system displays incorrectly, see "Resolving Terminal Emulation Problems"  for more information.

You can change the size of your QTerm window and the fonts that it uses by selecting one of the Font Size commands available on QTerm's -Settings menu. QTerm maintains a fixed ratio between font and window sizes to provide accurate terminal emulation. Selecting a different font size will automatically resize your QTerm window to the correct size.
Resolving Terminal Emulation Problems
If the output from an application on the remote computer system displays incorrectly, try selecting a different terminal emulation mode. In general, you should start with VT220 terminal emulation mode and work your way down through the other modes until you find a terminal emulation mode that works with the application you are trying to run. The VT220 terminal emulation mode is more advanced than the VT100 terminal mode, which is more advanced than the VT52 terminal emulation mode.
When you change the terminal emulation mode that QTerm is using, you should also reset the value of the terminal emulation mode that you are using on the remote system. If you are familiar with Unix, you can change this using Unix shell commands, as shown in the examples in Table 9 on page 226. You can also simply close the current telnet connection, open another one, and supply the new terminal emulation mode when prompted by the remote system.
Table 9: Setting Terminal Type to VT100 on Unix Systems
UNIX Shell:
Commands to Execute:
Bourne Shell
set term=vt100; export $term
C Shell
setenv TERM vt100
Korn Shell
export term=vt100
Contact the system administrator of the remote system if you need to know which Unix shell you are using on a host computer system.

 If you make a typo and are having problems correcting the characters that you type, you may want to change the values of the Backspace and Delete keys. Whether you set your Backspace key to send a Backspace or Delete character depends on your preferences and how the remote computer uses these keys. Setting Backspace to act solely as a Backspace key implies that Backspace and Delete are recognized as two different characters:
Backspace = Control-H, Decimal value 8, Hexadecimal value 0x08
Delete, Decimal value 127, Hexadecimal value 0x1f
The result of using these keys depends upon your terminal settings on the remote host, and how the remote application responds to these keys. You can use the stty erase command on a Unix computer to change the delete character for the current shell (see the Unix manual page for the stty command for more information).
Running Character-Based Applications
Once you have established a telnet connection to a computer system and have correctly defined your terminal emulation mode, you should be able to execute applications by typing the name of the appropriate command. For example, you can run the archie application by typing Archie and pressing the Enter key.
If you receive a message such as "command not found" after typing a command, the directory in which that application is located may not be in the list of directories that the remote system searches for programs. Contact the host computer's system administrator to determine where the application is located, and how to update your environment so that the application can be found.

If the application you are running produces a large amount of output, you can use QTerm's scrollbar to display information that has scrolled off the screen. The scrollbar is located on the right side of the QTerm window, and is activated or deactivated by pulling down the Settings menu, and selecting Scrollbar from the Window dropdown menu.
Closing a Telnet Connection
You can close a telnet connection by logging out from the remote computer system, by selecting the Close Telnet Connection icon from the toolbar, or by pulling down the File menu and selecting Close Telnet Connection. You will want to close a telnet connection after you have finished executing the last program that you want to run on the remote system.
You can log out from Unix hosts by typing the logout command. It is best to close a telnet connection by logging out from the remote host. This ensures that all applications that you were running have exited correctly and that any information you may have modified has been saved, if desired. You can use the Close Telnet Connection icon or menu command if you cannot get a response from the remote computer system.
Exiting From QTerm
To exit from QTerm:
 u 	Select the Exit command from QTerm's File menu.
The QTerm window closes.
Changing QTerm Settings
The commands on Qterm's Settings menu let you modify the appearance and behavior of QTerm. QTerm's Settings menu contains the following options:

Figure 92: QTerm's Settings Menu
You may want to change QTerm's settings to: 
t	Change your terminal emulation mode.
t	Change the size of your QTerm window or the size of the fonts used to display output.
t	Change other QTerm settings, such as text characters (language), keyboard, colors, etc.
To change QTerm's settings:
1	Pull down the Settings menu and select the desired command or dropdown menu.
An additional menu or dialog is displayed.
2	Change the settings and verify that those changes have the desired effect.
3	To save your changes for future QTerm sessions, select Save Settings. You can also use the Save Settings As command to save QTerm's settings with a file name other than the default file name QTERM.NVF. If you use the Save Settings As command, QTerm automatically creates an icon for you that lets you run QTerm with those settings by clicking on the icon. See the online help for more information.
Saving multiple sets of QTerm settings lets you separate different settings that you may want to use with different host computer systems or remote applications.

If you have made any changes to your QTerm settings, you should typically save your settings before exiting QTerm. This enables you to automatically re-use those settings the next time you run QTerm.

For more information about QTerm settings, see the online help for QTerm, under "Changing QTerm's Settings.
Using QTerm's Toolbar
QTerm's toolbar gives quick access to commonly-used commands. The toolbar is located below the menu bar, and is activated or deactivated by pulling down the Settings menu, selecting the Window command, and selecting Toolbar

Figure 93: QTerm's Toolbar
When you select an item on the toolbar and QTerm's status bar is active, a short description of the function of that toolbar icon is displayed in the status bar at the bottom of the QTerm screen. To activate or deactivate the status bar, pull down the Settings menu and select the Statusbar command from the Window dropdown menu.
Table 10 shows the functions corresponding to the icons on QTerm's toolbar:
Table 10: QTerm's Toolbar Buttons 

Displays the Open Telnet Connection dialog, enabling you to open a telnet connection to a specified host.

Closes the current telnet connection.

Prints the current contents of the QTerm window.

Copies selected text from the QTerm window to the Microsoft Windows clipboard.

Pastes the current contents of the Microsoft Windows clipboard into the QTerm window.

Erases the current contents of the QTerm window.

Displays the VT220 keyboard window (see Figure 94 on page 232), which enables you to select function keys or key combinations that may not be available on your PC keyboard. To use a VT220 keyboard function, click on the desired key.

Sends a Line Break character to the remote host. This character can be used to get the attention of the remote host.

Interrupts the application or command that is running on the host to which you are connected. This can be useful if you decide to cancel a long-running application that you started on the remote host. This command can also be used to cancel the playback of a QTerm Capture file.

Suspends the display of output from a remote application. This can be useful if the application produces a large amount of output that you want to be able to read. To resume displaying the output from the remote application, click on this icon again.

Provides quick access to the online help for QTerm.

 Figure 94 on page 232 shows QTerm's VT220 Keyboard window.

Figure 94: QTerm's VT220 Keyboard Window
Using The QTerm Commands Menu
The Commands menu enables you to execute commands to determine or modify the status of your connection to a remote computer. The Commands menu displays the following options:

Figure 95: QTerm's Commands Menu
The commands available on the Commands menu are shown in Table 11.
Table 11: QTerm Commands Menu Options 
command
description
Interrupt Process
Interrupts the application or command that is running on the host to which you are connected. This can be useful if you decide to cancel a long-running application that you started on the remote host. 
Abort Output
Stops displaying output from an application or command on the remote host and discards any remaining output. This can be useful if you have already gotten the information you want from a remote command, and do not want to see the remainder of its output.
Break
Sends a Line Break character to the remote host. This character can be used to get the attention of the remote host.
Are You There
Sends a message to the remote host to determine if the remote host is still active. This can be useful if you are executing a command that takes a substantial amount of time. If you have an active or live connection to the remote host, that system will send the message "Yes."
Erase Line
Erases the line that you had been typing to a remote host.
Pause Output
Suspends the display of output from a remote application. This can be useful if the application produces a large amount of output that you want to be able to read. To continue displaying the output from the remote application, select the Pause Output command again.
Reset Terminal
Resets all QTerm settings to their default values.
Command Setup
Lets you enter QTerm's command mode, in which you can define macros for QTerm commands that you may want to execute frequently, and bind those macros to function keys. Select the Command Setup command again to exit QTerm's command mode. See the online help in QTerm for more information about creating command macros.
Using Capture Files
Capture files allow you to keep a record of your interaction with a remote host and view it on your PC whenever you like. You may want to use a Capture file when:
t	You want to keep a record of your session. This can be very useful if you are searching for information using Archie or Gopher, and do not want to write your results down by hand.
t	An error condition occurs and you wish to capture a record of this to provide information to technical support.
Capturing Data From a Host
You must create or open a Capture file before the host begins transmitting the data that you want to record. Typically this means that you should open the Capture file before starting a client application. If you are trying to capture error information and an error occurs before you have activated a Capture file, open a new Capture file and then re-execute the command that caused the error.
To capture data from a host:
1	From the QTerm window, select Capture File from the File menu.
2	Select Open from the Capture File dropdown menu. 
The Open Capture File dialog box displays:

Figure 96: QTerm's Open Capture File Dialog Box
3	Use the Drives and Directories fields to select the drive and directory to which the file is to be saved.
4	Select the file type in the Save File as Type field. This lets you see files with a specified extension that already exist in the selected directory. You can view the list of existing Capture files (.CAP, which is the default), text files (.TXT), or files of any type (*.*).
5	Enter the filename for the Capture file in the File Name field. If you have not specified the file type as .CAP or .TXT in the Save File as Type field, you must specify the filename extension.

If the file you specify already exists, the new captured data will overwrite the data in the existing file.
6	Click OK to create or open the file. 
The file is now ready to start capturing data.
7	Enter the host command(s) to open the client application and to receive data on the QTerm window display screen.
All data input from the host is captured in the open Capture file.
QTerm will continue to capture (and save) all incoming characters and commands in the open Capture file until you close it (see Step 8).
8	When you are finished capturing data, select Close from the File menu's Capture File dropdown menu.
The file closes and the capture process terminates.
Reading a Capture File
Reading a Capture file lets you display the information previously saved in a Capture file. The contents of the Capture file are displayed in the QTerm window, but are not executed by the remote host.
To read (display) data previously captured in a Capture file:
1	From the QTerm window, select the File menu.
2	Select Read from the Capture File dropdown menu.
The Read Capture File dialog box displays:

Figure 97: Qterm's Read Capture File Dialog Box
3	Enter the name of the Capture file in the File Name field, or select the file using the Drives, List Files of Type, Directories and File Name fields. 
4	Click OK to start reading the file.
QTerm displays the file in the QTerm window.
QTerm will continue to read the file and will not stop the read operation until you pause it by clicking the Pause icon on the toolbar at the top of the screen.
You can cancel reading a Capture file at any time by selecting the Interrupt Process toolbar icon or menu command.
Copying and Pasting Using QTerm
You can copy and paste between the QTerm window screen and Microsoft Windows applications in the same way you normally copy and paste using Windows. 
QTerm supports the standard Windows key sequences and Edit menu to perform Copy and Paste operations. For information on copying and pasting information in Microsoft Windows applications, see your Microsoft Windows documentation. 
Using Script Files
Script files are text files that contain the sequence of QTerm commands that you execute to perform a specific function. QTerm's script file feature enables you to quickly create script files to perform functions such as logging into a remote host and accessing a specific client application.

Script files are text files that are created using standard Windows or DOS text editors. For information on using script files, run QTerm's online help and select Advanced Features.
