# dtterm Tasks

- StartStopTerminalEmulatorSI

- XTClosingTerminalTA

- CutPasteTextTA

- windowresize

- ResizeTerminalWindowTA

- XTRunningClientsTA

- rlogin

- config

## To Start dtterm

There are several ways you can start a &ProductName; `dtterm` terminal emulator:

- From the Front Panel

- From File Manager

- From a command in an existing terminal window

- From Application Manager

- From New in the `dtterm` Window pulldown menu

## To Start dtterm from the Front Panel

1. The terminal control is located in the Personal Applications subpanel.

   - Click the terminal control. The busy light blinks indicating that the terminal is being activated.

   - The `dtterm` window appears after a short time.

## To Start dtterm from File Manager

1. - Choose Open Terminal from the File menu.

   This opens `dtterm` with the same current directory as the File Manager view.

## To Start a Terminal Emulator Other Than dtterm

1. To use a terminal emulator other than `dtterm`, start it from a command line in an existing terminal emulator window.

   - At the command line prompt, type the name of the terminal emulator and any options you want. For example, to start `xterm`, enter:

         xterm  [options] &

     options

   - represents optional items to customize the terminal emulator.

`&`

- specifies that the terminal emulator runs in the background so you can continue working in your original window while the terminal emulator is running.

The terminal emulator starts in the current workspace unless directed otherwise by options.

## To Start dtterm from the Window Menu

1. - Choose New from the Window menu in an existing `dtterm` window. A duplicate `dtterm` window appears.

## Examples

1. The following command starts a `dtterm` window in the workspace `Project Notes`:

       dtterm -xrm '*workspaceList: "Project Notes"' &

   The following command starts a `dtterm` window on a screen on the system named "lgmcd":

       dtterm -display lgmcd:0.1 &

## See Also

1. - Refer to the `dtterm (1X)` man page for details about the options available for `dtterm`.

## To Close dtterm

1. Type `exit` at the command line and press Return.

2. Or, Choose Exit from the Window menu.

3. Or, choose Close from the window menu pulldown menu (accessed from the button at the upper left corner of the window manager frame).

Typing `exit` at the command line is the preferred method of closing `dtterm`. Closing it through the menus doesn't terminate any background processes you started from `dtterm`, which can sometimes cause problems.

## To Copy and Paste Text

## To Copy Text

1. 1. Using mouse button 1, drag the pointer over the text you want to copy. The text appears highlighted.

   2. Release mouse button 1 after all the text you want to copy is highlighted.

   The text is not removed from its original position.

## To Paste Text

1. 1. Position the cursor where you want to insert the text.

   2. Click mouse button 2.

   A copy of the current selection is pasted at the location you indicated. You can paste additional copies by repeating the above steps.

## To Resize the dtterm Window

1. Choose Window Size from Options.

2. Choose one of the three sizes:

   - 80x24

   - 132x24

   - normal

In some cases, depending on the screen size and font size you are using, you may not be able to resize the `dtterm` window to 132 columns. If this occurs, `dtterm` resizes to the maximum number of columns allowable under the circumstances.

You can also resize `dtterm` using the Window Manager menu.

## See Also

1. ResizeTerminalWindowTA

## To Resize the Window Contents

When you change the size of a terminal emulator window, applications running in the window may not know about the resizing. Use this procedure to resize the application's output.

- At the command-line prompt type:

      eval `resize`

## See Also

1. windowresize

## To Start Applications in a dtterm Window

- Enter the command to start the application at the command line prompt.

The general syntax for starting an application is:

    application [options] &

application

- The application name.

options

- a list of optional information to be passed to the application.

`&`

- specifies that the application runs in the background so you can continue to use the terminal emulator window while the application is running.

## Example

1. To start a digital clock from the command line:

       xclock -digital &

## See Also

1. - Refer to the man page or other documentation for each application to find the command and options to use for that application.

## To Log On to a Remote System

## Using rlogin

1. Use the `rlogin` command in an existing terminal emulator window to log in to a remote host. Once the window is acting as a terminal to the remote host, you can run applications there, redirecting the display back to your system if you desire.

## Example

1. The following command logs onto a system named `there`, runs the client `xload`, and redirects the display back to your original system. Assume your system is named `here`.

       rlogin there
       xload -display here:0

## Using remsh

1. The `remsh` command starts a shell on a remote host, performs some client (often starting a terminal emulator on that host), and redirects the display back to your original system if desired. (Systems that don't support `remsh` usually sypport the equivalent `rsh` command.) The syntax for the `remsh` command is:

       remsh remote -n client -display system:display[.screen]

   where:

   remote

2. The remote host name

client

- The program you want to run on the remote host

system:display[.screen]

- The host and display on which the results are to be displayed.

## Example

1. The following command runs `xload` on the remote host named `there`, and directs output back to your system, `here`.

       remsh there -n /usr/bin/X11/xload -display here:0.0 &

   The `remsh` command is often used when customizing a menu to access other hosts.

## To Configure dtterm

- setresources

- XTUsingScrollbarsTA

- XTSettingTTYResourceTA

### To Set dtterm Resources

A resource is a variable whose value affects some attribute of `dtterm`. Examples of resources are foreground color, background color, height, and width. Resources are found in a resource database. Examples of `dtterm` resources are:

    Dtterm*saveLines:  4s
    Dtterm*scrollBar: True

App-default files for the desktop applications are located in the `/usr/dt/app-defaults/language` directory.

Resources are loaded at session start-up by Session Manager. For information on how Session Manager loads the resources into the RESOURCE_MANAGER, see "Loading the Session Resources" in the CDE Advanced User's & System Administrator's Guide.

#### To Set System-Wide Resources

- Add the resources to the file `/etc/dt/config/language/sys.resources`. (You may have to create the file.)

For example, if in `/etc/dt/config/C/sys.resources` you specify:

    AnApplication*resource: value

then the resource `AnApplication*resource` is set in each user's RESOURCE_MANAGER property at the next login.

#### To Set Personal Resources

1. Add the resources to the file HomeDirectory`/.Xdefaults`.

2. Double-click Reload Resources in the Desktop_Tools application group.

### To Specify Scrollbars

1. Specify a `scrollBar` resource for the terminal emulator. If the value of `scrollBar` is True, `dtterm` will have scrollbars. If the value is False, it will not have scrollbars.

2. Log out, then log back in for the current session. (For home session, set home session, log out, then log back in.)

### Examples

1. To set scrollbars in all `dtterm` windows:

       Dtterm*scrollBar:     True

   To set scrollbars only for `dtterm` windows named "localTerminal":

       localTerminal*scrollBar:   True

### To Set Terminal Control Characters

- Edit the `ttyModes` resource using one of the methods described in Setting dtterm Resources.

The syntax for this resource is:

    ttyModes:  ^C  name

where name is the control, and C is the character. For example, the default value of `ttyModes` is:

    ttyModes:	erase ^H intr ^C kill ^U start ^Q stop ^S swtch ^@

Because `dtterm` only emulates a terminal, your control characters might not be what you are used to on a physical terminal. The `ttyModes` resource enables you to set control characters for your terminal emulator.

By default, Login Manager sets the following control characters.

Control name

- Character (Effect)

erase

- ^H (Backspace erases characters)

intr

- ^C (Interrupt - cancel the current operation and redisplay the command line prompt)

kill

- ^U (Clear the input line)

start

- ^Q (Start subprocess output)

swtch

- ^@ (Switch between layers in a shell)

The "`^`" character stands for the CTRL key, so to interrupt an operation in progress you press CTRL C. When setting `ttyModes`, use the ^ key instead of the CTRL key.