• Aucun résultat trouvé

Special Terminal Emulator Options

Both hpterm and xterm, because they are terminal emulators, have some special options that other clients don't have.

Making a Login· Window

Both hpterm and xterm have an option that allows you to specify that the window runs a login shell before displaying the command-line prompt. Using the -Is option, the shell runs as a login shell, that is, the shell reads the / etc/ csh . login file and . login, or / etc/profile and . profile file before starting the window.

Cutting and Pasting with the Mouse

Both hpterm and xterm allow you to use the mouse for cut and paste operations. You can cut text from one location in a window to another, or from one window to another.

Currently, hpterm and xterm use the button definitions in the following table for cut and paste operations:

Table 4-6.

Mouse Button Definitions for Cut and Paste Operations

If you see ... On a 2-button mouse press ... On a 3-but ton mouse press ...

Button 1 The left button. The left button.

Button 2 Both buttons simultaneously The middle button.

Button 3 The right button. The right button.

Running from the Command Line 4-17

To cut and paste using 'hpterm'.

Cutting text To cut text, follow these steps:

Pasting text

1. Press and hold the (Shift) key.

2. Position the pointer at the start of the text you want to cut and press and hold button 2. This marks the beginning of the text region.

3. Drag the pointer to the end of the text you want to cut and release the button. This copies the text into a global cut buffer, a buffer that holds text that has been edited out.

The region is marked as you drag the pointer.

To paste text from the global cut buffer into a window, follow these steps:

1. Press and hold the (Shift) key.

2. Position the pointer in the window in which you want to paste the text. Because the text will appear like it is being typed at the cursor's location, you may need to position the cursor as well.

3. Click button 3 to "type" the text.

Copying a line To copy a single line of text from one place and paste it in at the cursor location, follow these steps:

1. Press and hold the (Shift) key.

2. Position the pointer at the start of the text you want to copy.

3. Click button 1 to copy text from the pointer to the end of the line and "type" it at the cursor location in the same window. (Position the pointer in another window and click button 3 to "type" the text in the second window.)

To cut and paste using 'xterm'.

Cutting text To cut text, follow these steps:

1. Position the pointer at the start of the text you want to cut.

2. You can cut a text region in the following three ways:

4·18 Running from the Command Line

Pasting text

• To cut a region character by character, click and hold button 1.

• To cut a region word by word, double-click and hold button 1.

• To cut a region line by line, triple-click and hold button 1.

This marks the beginning of the text region.

3. Drag the pointer to the end of the text you want to cut and release the button. This copies the text into the global cut buffer.

To paste text from the global cut buffer into a window, follow these steps:

1. Position the pointer in the window in which you want to paste the text. Because the text will appear like it is being typed at the cursor's location, you may need to position the cursor as well.

2. Click button 2 to "type" the text.

Extending text You can extend or contract either half of the current selection by following these steps:

Scrollbars

1. Position the pointer in the top or bottom half of the text that you have selected with button 1.

2. Press and hold button 3.

3. To expand or contract the half that you picked, drag the pointer away from or toward the center point of the selection.

4. When the selected area includes the correct text, release button 3.

You can start either an hpterm or xterm window with scrollbars. To do this, include the -sb option on the command line when you start the window. For example, to start an hpterm window with a scrollbar, type the following line after the command prompt:

Running from the Command Line 4-19

hpterm -sb

&

(Return)

Window Titles and Icon Names

By default the title of a terminal emulation window is Terminal Emulator.

Equally original are the default names that appear on labels of hpterm and xterm icons. These are, respectively "hpterm" and "xterm." Two options enable you to give your terminal windows and icons more original names if you so desire.

Use the -title option to give a title to a terminal emulation window. Titles with two or more words must be enclosed in quotes ("titlel title2").

Use the -n option to give a name to the icon of a terminal emulation window.

Icon names of two or more words must be enclosed in quotes ("namel

name2"). Note also that lengthy names may be truncated on the right to the width of the label.

The following example illustrates the use of these two options:

hpterm -n System -title "System Window" & (Return)

This example creates an hpterm window, giving it the title "System Window."

When the window is iconified, the icon label reads "System."