Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Shells: User's Guide: HP 9000 Computers > Chapter 26 Getting Started With Key Shell

Starting Key Shell

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

When you first log on to an HP-UX system, the Bourne Shell is the default shell. To use the Key Shell instead, first ensure that the following shell variables are set and exported in your .profile file. Depending on your terminal type, you may be able to use the identify(1) command to check these variables and set them correctly.

  • TERM must be set to the terminal type you are using.

  • If your terminal is a nonstandard size (such as an X window), the LINES and COLUMNS variables must be set to the correct values for the terminal.

To start Key Shell, do one of the following:

  1. If you want to use keyshtemporarily, type this command:

    keysh Return

    Return to your regular shell by typing exit Return.

  2. If you want to use keyshpermanently, type this command:

    chsh your_username /usr/bin/keysh Return

    Then log out and log back on again. From now on, whenever you log on, keysh is your shell.

The Default Key Shell Environment

When you first start keysh, you will see a display like that in Figure 26-1 “Key Shell Softkey Display”:

Figure 26-1 Key Shell Softkey Display

Key Shell Softkey Display

The parts of this display are as follows:

  1. The first line shows the standard Korn Shell prompt, $.

  2. The second line is the status line. By default, it displays the host name, current directory, mail status, and time.

  3. The third line shows the top-level softkey menu. Each softkey corresponds to a function key on your keyboard, f1 through f8. The hpterm at the center separates the keys into groups of four.

    Note that there are four banks of available softkeys in the top-level menu. Select --More-- several times to familiarize yourself with the softkeys on each bank.

Key Shell Initialization

This section describes what happens when you start Key Shell. For information on the login program and on setting up your .profile and .kshrc files, refer to Chapter 16 “Starting and Stopping the Shell” in the Part IV “POSIX and Korn Shell” part of this manual.

When you start keysh, it performs the following tasks:

  • Customizes your shell environment by executing these files: /etc/profile, .profile, and the file indicated by the ENV variable in .profile (typically .kshrc).

    keysh then resets the initial value of the PS1, PS2, and PS3 shell variables. Do not subsequently change these variables from the command line. Instead, you can use the KEYSH variable to display status information (described in “Setting Shell Variables”).

  • Determines characteristics of your terminal, as specified by the TERM shell variable. Also checks LINES and COLUMNS, if set.

  • Configures itself, based on your local .keyshrc file. (If this file does not exist, /usr/keysh/C/keyshrc is used instead.)

    The .keyshrc file contains configuration information for the following:

    • Visible softkeys and their labels.

    • keysh global option settings.

    • Status line contents.

    Your .keyshrc is automatically updated every time you change Key Shell's configuration. You should not need to edit this file manually.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-1991 Hewlett-Packard Development Company, L.P.