Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ CommandShell(1) — A/UX 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

StartMonitor(1M)

brc(1M)

startmac(1M)

startmsg(1M)

termcap(4)




CommandShell(1) CommandShell(1)
NAME CommandShell - A/UX(Reg.) Toolbox application for managing command-interpretation windows and moderating access to the A/UX console window SYNOPSIS CommandShell [-b pid] [-u] [-q] DESCRIPTION CommandShell provides a Macintosh user interface to A/UX users. Within CommandShell windows, you can enter A/UX com- mand lines for processing by one of the available shells. A/UX commands can be entered with the aid of Macintosh copy and paste operations. The source of text that can be copied to the Clipboard includes any previous command lines in the same window as well as any text available in other windows (including other Macintosh application windows). The Com- mandShell windows are scrollable, so you can make previous commands or resultant outputs available for copying. A/UX commands can also be built semiautomatically by enter- ing the command name at the start of a line and then choos- ing the Commando menu item from the Edit menu of Command- Shell. After entering information in the dialog box, the command line is changed to include all the flag options and arguments that were generated with the help of the Commando dialog. This same function is also available through the cmdo command, which is described in cmdo(1). When CommandShell is started normally, one window is displayed by default unless you have saved a previous window layout with more than one window. More windows can be created by choosing New from the File menu or pressing COMMAND-N. A new window appears in front of the existing window or windows. The title bar of each window is numbered in sequence according to its creation order. Normally you can create up to 15 windows. When you create a new window, it appears in front of and to the lower right of the previous window. This position ob- scures the windows behind the front window. You can use the tiling commands to view the contents of all the windows. For specific tiling commands, see the section describing the Window menu. Besides managing command-interpretation windows, Command- Shell moderates access to the A/UX console window. This window is one of the places where the A/UX environment and the Macintosh desktop environment meet. Kernel error mes- sages are routed to this window so they do not disturb the bit-mapped display of Macintosh applications. April, 1990 1



CommandShell(1) CommandShell(1)
The Macintosh user interface is an integral part of the A/UX boot process, supported in part by the A/UX console window of CommandShell. This special window is the place where all boot messages are routed and the place where you enter responses in the event that one of the boot processes re- quires user input. The A/UX console window is unlike any other CommandShell window because it can never be closed (although it can be hidden or obscured). During the boot process, CommandShell disables many of the functions in its menus (see the -b flag option). All the status messages that are normally directed to the system console during startup no longer appear. Many of these messages are not useful to anyone besides the system administrator. A progress bar is presented to users in place of the startup messages. When multiuser mode is entered, the progress bar is replaced by a login dialog box. If you wish to inspect the boot messages that resulted when the system was last booted, you can choose the A/UX System Console window from the Window menu of CommandShell. Within multiuser mode, a CommandShell process has to be started manually through a command request or automatically through the Login preferences that you maintain at the time you log in to the system (see Login(1M)). To view the A/UX console window, perform these steps: 1. Choose CommandShell from the Apple menu. 2. Choose A/UX System Console from the Window menu. 3. Use the scroll bar to scroll back the contents of the window. Processes that run as part of a startup script, such as /etc/sysinitrc, or as another part of the booting process may occasionally ask for user input. For example, suppose you add another Ethernet card to your system. Then suppose that while rebooting, the system needs to request address information about the new card. You will not see a prompt for this information directly. Instead an alert box will appear in front of the A/UX boot progress bar. The alert box will say that an A/UX process requires input. Clicking OK in the alert box will cause the the A/UX console window to appear and the alert box to disappear. The A/UX console window will contain messages prompting you for input. At these junctures, you will be permitted to provide input into the window. At all other times, the window is for reading purposes only. 2 April, 1990



CommandShell(1) CommandShell(1)
The alerting process that has just been described is re- ferred to as a notification system. A similar notification system has been created for the handling of A/UX kernel mes- sages. Alert boxes are displayed that encourage you to in- spect the text of the A/UX error messages that has been tucked away in the normally-hidden A/UX console window. Here is what you should do in response to this form of no- tification: 1. After reading the alert box, click OK. 2. Make CommandShell the selected application if it is not already the application in control of the active win- dow. 3. Inspect the A/UX kernel errors by choosing A/UX System Console from the Window menu of CommandShell. When chosen, this menu item makes active the normally hidden A/UX console window. If it was hidden, it will now be visible. It should contain all the error messages gen- erated since the last time the system was booted (if you scroll back, you can see the old messages). It will also let you respond to any prompts for input. If after checking the window messages in the A/UX console window, you see that the error information regards system or network performance (such as a number of retries before suc- cessful transmission of a network packet), then no further corrective action is required. Sometimes, however, the er- ror message may indicate a serious error condition, such as ``file system full,'' ``file system corrupt,'' or ``fork failed: too many processes.'' In these cases your current work is subject to loss if the error condition persists. You can change the way the system notifies you of a process needing input or a system message when CommandShell is not the active application. To set notification preferences, choose Notification Levels from the Preferences menu. Choosing Notification Levels displays a dialog box in which you can select to be notified by an alert box, a flashing icon in the menu bar, or both. User preferences are normal- ly stored in the .cmdshellprefs files located in the home directories of each user (see ``Managing CommandShell preferences''). The default notification is to display an alert box because console messages may indicate a fundamen- tal system problem that you should know about immediately. When CommandShell is run in the normal way and is the active application, a Quit menu item is not available under the File menu (see the -q flag option for an alternative way of running CommandShell). Instead of a Quit function, which April, 1990 3



CommandShell(1) CommandShell(1)
would leave you with no way to view or enter responses directed to the system console, CommandShell has the menu item Close All Windows. This menu item kills all shell processes and closes all of the windows, except the A/UX console window that accepts console messages. If you simply wish to set aside CommandShell windows without killing ac- tive processes, choose Hide Command Shell Windows from the Apple menu. The combined A/UX and desktop environment supported with CommandShell is unique in terms of the flexibility you have for performing file manipulation chores. To delete a file, you can drag it in its iconic form on the desktop to the Trash icon and choose Empty Trash from the Special menu. Al- ternately, you can open a CommandShell window to run the A/UX command rm. The latter way may be the quicker way to perform a sophisticated operation. For example, consider the task of removing all files in the current folder (or direc- tory) containing the letters ``.tmp.'' The easy way is to use a command line such as rm *.tmp* Since A/UX is a multitasking system, other windows besides the active one receive processor attention. But when you use a command, only the active window (the window with horizon- tal lines in the title bar) receives the instruction. All mouse and keyboard inputs are reliably intercepted by the active window. However, if the active application has no open windows, character sequences may be lost. The terminal emulation capabilities of CommandShell are most closely analogous to those of mac2cs in /etc/termcap. MENU OPTIONS CommandShell displays menus titled File, Edit, Window, Fonts, Commands, and Preferences in the menu bar at the top of the screen, plus the Apple menu at the far left of the menu bar. To choose a menu item, position the pointer on the menu title, press and hold the mouse button, and move the pointer to the menu item while holding down the mouse but- ton. Release the mouse button when the pointer highlights the desired item. Many menu items can be chosen from the keyboard by holding down COMMAND (not CONTROL) and typing a character. The character required is shown beside the Command-key symbol in the menu. Such Command-key equivalents may be entered as lowercase; you don't need to hold down SHIFT as well. 4 April, 1990



CommandShell(1) CommandShell(1)
The following sections describe the actions performed by the various CommandShell menu items. The Apple Menu At the far left of the menu bar, the Apple symbol is the ti- tle of a menu that contains some general Macintosh desk ac- cessories and some menu items specifically related to Com- mandShell. The menu items related to CommandShell include: About CommandShell Display a dialog box that gives version in- formation. Hide Command Shell Windows Hide CommandShell windows temporarily without killing active processes. CommandShell Make CommandShell the selected application and make its associated window that was most recently active the currently active window once again (if any were opened before). The File Menu The menu items in the File menu allow you to do such things as create and close windows and select printing options. New Create a new window. The windows are num- bered sequentially according to their crea- tion order. The Command-key equivalent for the New menu item is COMMAND-N. Open... Launch a UNIX command or launch an editor if the highlighted file is a text file. The Command-key equivalent for Open menu item is COMMAND-O. Close Close the active window. Before you close a window, make sure that you write the contents of the window to a disk if you want to save your work. The Command-key equivalent for the Close menu item is COMMAND-W. Save Selection Save the contents of a CommandShell window in an A/UX file. The text you want saved must be selected (the text appears highlighted). Save Preferences Save all window settings, layout information, and notification level settings. Restore From Preferences Restore window settings and layout to that April, 1990 5



CommandShell(1) CommandShell(1)
specified in the preferences file. Open any saved windows that have been closed. Run in- itial command in windows that do not already have a command running. Page Setup Display a dialog box that lets you set the paper size, orientation, and reduction or en- largement for subsequent printing actions. Print Selection Print selected text from the active window. Use the Chooser desk accessory, available in the Apple menu, to specify which printer to use. Use the Page Setup menu item, just described, to specify paper size, orienta- tion, and scale. Close All Windows Close all windows at once. All the windows disappear. Before you close the windows, make sure that you write the contents of each window to a disk if you want to save your work. If you don't write the contents to a disk, they are lost. The Edit Menu The menu items in the Edit menu help you do such things as move text around and perform certain global formatting ac- tions. Undo Reverse the most recent text change. If you choose Undo a second time, the change is rein- stated. The Command-key equivalent for the Undo menu item is COMMAND-Z. Cut Copy the currently selected text in the active window to the Clipboard and then delete it from the window. This menu item is used with desk ac- cessories only; otherwise it is disabled. The Command-key equivalent for the Cut menu item is COMMAND-X. Copy Copy the currently selected text in the active window to the Clipboard without deleting it from the window. The Command-key equivalent for the Copy menu item is COMMAND-C. Paste Inserts the contents of the Clipboard at the current text cursor location. The Command-key equivalent for the Paste menu item is COMMAND-V. Clear Delete the currently selected text from the ac- 6 April, 1990



CommandShell(1) CommandShell(1)
tive window. This menu item is used with desk accessories only; otherwise it is disabled. The Command-key equivalent for the Clear menu item is DELETE. Select All Select the entire document shown in the active window. The Command-key equivalent for the Select All menu item is COMMAND-A. Commando Build commands semiautomatically. Choose this after entering the command name at the start of a line. Afterward, a dialog box is displayed that depicts all the features of the command. Upon exiting the dialog, the command line that you started to specify at the outset is changed to include all of the flag options and arguments that were generated with the help of the Comman- do dialog. The Command-key equivalent for the Commando menu item is COMMAND-K. The Window Menu The menu items in the Window menu help you arrange and display CommandShell windows. The menu is divided into three parts. The upper part of the menu contains menu items that help you arrange windows in various formats. The middle part contains menu items that help you size and order the win- dows. The lower part contains a list of all windows currently available in CommandShell. When you choose one of the window names in the lower list, CommandShell makes the corresponding window the active window. The names of currently available windows are listed in the order they were originally created. The menu items in the top part of the menu do the following: Tile Position windows in a right-to-left, then top-to-bottom sequence. You must have more than one window on the desktop to use this menu option. The Command-key equivalent for the Tile menu item is COMMAND-T. Tile Horizontal Position windows from top to bottom on the screen in their creation order. The windows are stretched to fit the width of the screen. The height of each window is adjusted to ac- commodate the number of windows. Tile Vertical Position windows from left to right on the screen in their creation order. The windows are stretched to fit the height of the screen. The width is adjusted to accommodate April, 1990 7



CommandShell(1) CommandShell(1)
the number of windows. Standard Positions Reposition the windows in the original stacked order, from front to back. The items in the middle part of the menu do the following: Standard Size Resize a window to its original dimensions. The Command-key equivalent for the Standard Size menu item is COMMAND-S. Full Height Stretch a window to the full height of the screen. The Command-key equivalent for the Full Height menu item is COMMAND-F. Zoom Window Make the window larger. The window automati- cally is resized to fit the whole screen. You can return a window to its previous size by choosing the Zoom Window menu item again. Hide window-name Make window-name temporarily disappear. The window is no longer visible, but is still available. To show a window that has been hidden, choose the window name from the Win- dow menu again. The window appears in front of other open windows and becomes the active window. The Command-key equivalent for the Hide Terminal item is COMMAND-H. Show All Windows Show all windows that have been hidden. Last Window Makes the previously active window the active window once again, making it visible if it was hidden, and making it the recipient for any keyboard or mouse inputs. Repeating this selection, returns the windows to their ori- ginal states. The Command-key equivalent for the Last Window menu item is COMMAND-L. Rotate Window Move the rear window to the front of all the other windows. The Command-key equivalent for the Rotate Window menu item is COMMAND-R. The menu items in the bottom part of this menu are window names for all currently available CommandShell windows. Selecting a window name makes it the active window, which also makes it visible as the front window. Among any other windows listed is the ever-present A/UX console window. 8 April, 1990



CommandShell(1) CommandShell(1)
A/UX System Console Make the A/UX console window the active win- dow. This window is used to view console mes- sages. The Command-key equivalent for the A/UX System Console menu item is COMMAND-0 (zero). The Fonts Menu The Fonts menu lets you choose the type of font and the point size of the font for text entered or displayed in the active CommandShell window. The Commands Menu The menu items in the Commands menu help you set defaults for recording information and allow you to clean up the screen. Don't Record Lines Off Top/Record Lines Off Top When CommandShell is invoked, it is set to record a preset number of lines as they scroll out of view. If you do not want to store the lines for possible review later, you can stop the recording of lines for a particular window. If the default setting is left unchanged, the menu item Don't Record Lines Off Top appears in the Commands menu. Choose it so the lines are not recorded. If the lines are not being recorded, the menu item Record Lines Off Top appears in the menu. Choose it to record the lines off the top of the window as they scroll out of view from a particular window. Clear Lines Off Top Erase recorded lines and make them no longer available for review within a particular win- dow. The scroll bar disappears in the active CommandShell window. Redraw Screen Clean up the screen if textual output affects the bitmapped display. The Preferences Menu The menu items in the Preferences menu help you select how you want to be notified of system messages, choose your de- fault window settings, and allow you to set your preferred window configuration. Notification Levels... Set the notification level for console messages. A di- alog box appears in which you choose how you are noti- fied of console messages. The choices are an alert April, 1990 9



CommandShell(1) CommandShell(1)
box, a flashing icon in the menu bar, or both. New Window Settings... Specify the default title prefix, window cascade ori- gin, window size, font name, font size, and number of lines saved off the top of the window. A dialog box appears for these specifications. Active Window Settings... Specify the settings for the active window. A dialog box appears allowing you to specify window title, size, and position; whether or not to save lines off the top; and the initial command to run in the window when it opens. Managing CommandShell preferences Preferences are normally saved in the .cmdshellprefs file located in the home directory. To maintain more than one set of preferences, you can establish a different filename as the file for storing preferences. For example, to allow one set of preferences (window sizes and so forth) to be saved for use with a large display device and another set of preferences to be saved for use with a smaller display dev- ice, you can reset the CommandShell variable that controls the file that is used to maintain these settings. The name of this variable is CMDSHELLPREFS. This variable can be set to be something other than .cmdshellprefs. When reset, the variable is normally assigned the name of a file relative to the user's home directory, although an absolute pathname is also acceptable. The choice of an absolute pathname is par- ticularly helpful when your home directory is served to you through a file server which you access through several dif- ferent A/UX systems. In such a case, each system can con- tain a preferences file that is customized for its own hardware. FLAG OPTIONS When invoked without any flag options, CommandShell starts with one active window on the desktop. The window is titled ``CommandShell 1.'' The following flag options modify this default behavior: -b pid Used at boot time to start CommandShell in a background layer without any windows. With this option, CommandShell accepts window management commands only as far as permitting the displaying of the A/UX console window. You do this by choosing CommandShell from the Apple menu and then choosing A/UX System Console from the Window menu. No command-interpretation windows can be displayed. The treatment of kernel errors or re- quests for input are treated as has been described pre- 10 April, 1990



CommandShell(1) CommandShell(1)
viously. pid is the process ID of macsysinit (see brc(1M)). After taking control of the system console, CommandShell sends a signal to this PID to exit. This signal heralds the continuation of all the remaining startup processes, which can continue with the as- surance that alert boxes will be produced as necessary to notify users of the need for interaction with mes- sages directed to the system console. -u Specify that a user has logged in and start CommandShell in a background layer. When CommandShell is made the active application, the user's preferred (or default) CommandShell window layout is established. The default is to open a single CommandShell window. When started this way, individual user preferences can be stored using Save Preferences in the File menu. -q Do not include a Quit menu item in the File menu and bring CommandShell into the foreground. FILES /mac/bin/CommandShell object file /mac/bin/%CommandShell resource fork $HOME/.cmdshellprefs default preferences file SEE ALSO StartMonitor(1M), brc(1M), startmac(1M), startmsg(1M), termcap(4). April, 1990 11

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026