This chapter provides information about the Command Tool, Shell Tool, and Console Window (or Console). These tools are essentially the same application, but display different default pane pop-up menus. The Command Tool is an enhanced Shell Tool.
Command Tool and Shell Tool are standard OpenWindows shells, or terminal emulators, that interpret commands typed in UNIX. When you use one of these applications it is as if you are working at a terminal, rather than in a complex networked windowing environment. The advantage is that you can display many other windows and continue running other applications at the same time.
These tools are useful if you need to:
Read reference manual pages
Use a command line editor such as vi
Invoke special processes and applications not available from the Workspace menu
The Console is a special Command Tool designated for displaying error and system messages sent by the SunOS operating system, the OpenWindows environment, and some applications.
Command Tool provides a scrolling pane that acts as an editable command interpreter and can also provide a standard text editing pane. It can be used for a variety of tasks, including moving around in your file system, composing and editing files, and communicating with the operating system.
To open a Command Tool, choose Workspace -> Programs -> Command Tool.
For more information on these elements, refer Chapter 1, Introduction to the Solaris User Environment.
In a Command Tool, the Term Pane pop-up menu has the Edit, Find, and Extras items of the standard text editing pop-up menu (described in Chapter 3, Text Editor), plus three additional items: the History, File Editor, and Scrolling submenus. Move the pointer anywhere onto the Command Tool pane and press MENU to display the Term Pane menu.
The History of a Command Tool is a log of all the characters displayed. You can access this log by scrolling the Term Pane with the scrollbar or by saving the log to a file. This may be useful, for example, if you have performed a complicated sequence of operations that you want to save or send as part of a mail message for troubleshooting or debugging. The History submenu provides options to modify the history log.
The Mode setting determines whether the history log is Editable within the Command Tool, or Read Only. If you set the mode to Read Only in order to protect against accidental changes, you can still save the log to a file and edit that file using the File Editor option described in the next section. If the mode is editable, you can edit text anywhere in the Term Pane and use the editing items on the Term Pane menu. See Chapter 3, Text Editor for information on the editing functions.
When you choose this option, the Text: Save As window is displayed. For complete information on saving files refer to Chapter 1, Introduction to the Solaris User Environment.
You can treat this new file as you would any other text file. You can edit it and save it again or drag and drop it from the File Manager onto a Mail Tool Compose or Text Editor window.
This resets the Command Tool history log as if you just started the Command Tool application. (This does not change the output of the UNIX history command.)
The items on the File Editor submenu determine whether a Text Editor Pane is displayed. When you enable the File Editor, the Command Tool is split into two panes: a Command Tool pane and a Text Editor pane. The Text Editor pane is described in Chapter 3, Text Editor. Figure 6-2 shows a Command Tool with the File Editor enabled.
You can access all of the files and directories in your file system from the Command Tool. Use of the Command Tool requires familiarity with the operating system and with your file system.
In the sample session that follows, the cd command changes directories to your home directory, the mkdir command creates a new directory there, and the cp command copies that directory to a new directory with a different name. You execute each command when you press Return at the end of the command line.
example% cd (Press Return) example% mkdir Directory1 (Press Return) example% cp -r Directory1 Directory2 (Press Return)
The Command Tool is a scrolling window. The scrollbar at the side of the window enables you to go back and view commands that are no longer visible in the window. You can scroll back to see the commands typed during the entire life of the window.
In the Command Tool, the command line can be edited. You can move the pointer to any location on the command that you have typed and click SELECT to position the insert point there. You can then type in that location or erase the previously typed characters and retype that portion of the command. Figure 6-3 shows the insert point.
Command Tool can be used as a Text Editor window at any time. The advantage to this is that you do not need to know a command line editor such as vi. To enable the Command Tool text editing window, move the pointer onto the window pane, press the MENU button, drag the pointer down to highlight File Editor, and then to the right to highlight Enable. The Command Tool pane splits in two; the top pane remains as Command Tool, while the bottom pane becomes a Text Editor.
See the "Text Editor" section for an introduction to the commands in the Command Tool File Editor.
To return to the basic Command Tool, position the pointer in the top pane and choose File Editor -> Disable.
Like Command Tool, Shell Tool is a window that you use to communicate with the operating system, or to move around in your file system and compose and edit files by command line. You can use Shell Tool for shells or other programs that employ a standard teletype (TTY) interface.
The basic differences between Command Tool and Shell Tool are:
Command Tool is a scrolling window by default.
Shell Tool cannot be converted into a File Editor.
Their default pane menus.
To open a Shell Tool window, choose Workspace -> Programs -> Shell Tool.
Open as many Shell Tools as you need, but remember that as you add more applications to the Workspace, you may compromise system performance.
A Shell Tool window has a header with a Window menu button, a Window menu, resize corners, and a terminal emulator pane. A Shell Tool window does not have a scrollbar at start up, but you can enable scrolling if desired. The insert point is shown by a block cursor. When the insert point is not in the Shell Tool, the block cursor is displayed as an outline of the block cursor. Editing is limited to the end of the current line. For example, you can only delete characters on the current line. Once you press Return, the characters on the line are interpreted as a command. If you are not familiar with these window elements, refer to Chapter 1, Introduction to the Solaris User Environment.
To display the Shell Tool terminal emulator pane menu, move the pointer anywhere into the Shell Tool pane and press MENU.
The pointer changes to a stop sign when the window fills up, as shown in Figure 6-6.
Instead of displaying continuing text in the window, the display stops so that you can look at it as long as you like. The Enable Page Mode item on the Term Pane pop-up menu changes to Continue when there is more information that you can display.
When you want to see the next pane, press any key or choose Continue from the Term Pane menu.
Use the Copy item to copy highlighted text from the Shell Tool window to the clipboard.
When there is text on the clipboard, you can use the Paste item to insert the contents of the clipboard at the insert point.
The Enable Scrolling item on the Term Pane menu can be used to turn the Shell Tool into a Command Tool. When you choose Enable Scrolling, the name stripe at the top of the Shell Tool still says "shelltool", but the application acts like a Command Tool. See the section, "Command Tool", for details.
The Console is a special Command Tool window that is used to display error and system messages for the SunOS operating system, the OpenWindows environment, and some applications. You can recognize a Console window by the term (CONSOLE) in the Command Tool header.
If you do not have a Console window, messages are displayed in large type at the bottom of the screen. To clear such messages, choose Refresh from the Workspace menu. Always have one (and only one) Console window running. If you have more than one Console window running, messages are displayed in the most recently opened Console window. You may miss important system messages if you have more than one Console window running and do not look for messages in the newest one, or if you have opened a new Console window and then quit the most recently opened one.