Manual page for SHELLTOOL(1)
shelltool - run a shell (or other program) in a SunView terminal window
SYNOPSIS
shelltool
[
-C
]
[
-B
boldstyle
]
[
-I
command
]
[
generic-tool-arguments
]
[
program
[
arguments
] ]
AVAILABILITY
This command is available with the
[a manual with the abbreviation SVBG]
software installation option. Refer to
[a manual with the abbreviation INSTALL]
for information on how to install optional software.
DESCRIPTION
shelltool
is a standard SunView facility for shells or other programs
that may use a standard tty-based interface.
When invoked,
shelltool
runs a program, (usually a shell) in an interactive terminal emulator
based on a tty subwindow.
Keyboard input is passed to that program.
If the program is a shell, it
accepts commands and runs programs in the usual way.
cmdtool.1
which provides moused-based editing, logging, and scrolling
capabilities, also supports shell-level programs.
See
[a manual with the abbreviation SVBG]
for more information.
To run graphics programs, use
gfxtool.1
OPTIONS
- -C
-
Redirect system console output to this
shelltool.
- -B boldstyle
-
Set the style for displaying bold text to
boldstyle.
boldstyle
can be a string specifying one of the choices for the
/Tty/Bold_style
default, see
Defaults Options,
below, or it may be a numerical value for one of those choices,
from 0 to 8, corresponding to the placement of the choice in the list.
- -I command
-
Pass
command
to the shell.
SPACE
characters within the command must be escaped.
- generic-tool-arguments
-
shelltool
accepts the generic tool arguments
listed in
sunview.1
If a
program
argument is present,
shelltool
runs it.
If no
program
is given,
shelltool
runs the program indicated by the
SHELL
environment variable, or
/usr/bin/sh
by default.
USAGE
Defaults Options
These options are available through
defaultsedit.1
- /Tty/Bold_style
-
Select a style for emphasized text:
-
- None
-
Disable emphasis.
- Offset_X
-
Thicken characters horizontally.
- Offset_Y
-
Thicken characters vertically.
- Offset_X_and_Y
-
Thicken characters both horizontally and vertically.
- Offset_XY
-
Thicken characters diagonally.
- Offset_X_and_XY
-
Thicken character both horizontally and diagonally.
- Offset_Y_and_XY
-
Thicken characters both vertically and diagonally.
- Offset_X_and_Y_and_XY
-
Thicken characters horizontally, vertically and diagonally.
- Invert
-
Display emphasis as inverse video (the standard default).
- /Tty/Inverse_mode
-
Select a style for inverse video display:
-
- Enable
-
Enable inverse mode for inverted text.
- Disable
-
Disable inverse mode for inverted text.
- Same_as_bold
-
Display inverted text as bold text.
- /Tty/Underline_mode
-
Select a style for underlined text:
-
- Enable
-
Enable underline mode for underlined text.
- Disable
-
Disable underline mode for underlined text.
- Same_as_bold
-
Display underlined text as bold text.
- /Tty/Retained
-
When set to ``Yes'', hidden tty subwindow areas are retained in memory.
This enhances the speed of repainting the screen at the expense
of memory area. ``No'' is the standard default; it specifies that tty
subwindows are not retained.
The Terminal Emulator
The tty subwindow is a terminal emulator.
Whenever a tty subwindow is created, the startup file
~/.ttyswrc
is read for initialization parameters that are specific to the
tty subwindow.
The .ttyswrc File
A sample
.ttyswrc
file can be found in
/usr/lib/ttyswrc.
The command format for this file is:
-
- #
-
Comment.
- set variable
-
Turn on the specified variable.
- mapi key text
-
When
key
is typed pretend
text
was input.
- mapo key text
-
When
key
is typed pretend
text
was output.
The only currently defined variable is
pagemode.
key
is one of L1-L15, F1-F15, T1-T15, R1-R15,
LEFT,
or
RIGHT
(see note below).
text
may contain escapes such as \E, \n, ^X, etc.
(ESC,
RETURN,
and
CTRL-X,
respectively).
See
termcap.5
for the format of the string escapes that are recognized.
Note:
mapi
and
mapo
may be replaced by another keymapping mechanism in the future.
When using the default kernel keyboard tables, the keys
L1,
LEFT,
RIGHT,
BREAK,
R8, R10, R12, and R14
cannot be mapped in this way; they send special values
to the tty subwindow.
Also, when using the default kernel keyboard tables,
L1-L10 are now used by SunView.
See
input_from_defaults.1
and
kbd.4s
for more information on how to change the behavior of the keyboard.
It is possible to have terminal-based programs drive
the tool in which its tty subwindow resides by sending
special escape sequences.
These escape sequences may also
be sent by typing a key appropriately mapped
using the
mapo
function described above.
The following functions pertain to the tool in which the tty
subwindow resides, not the tty subwindow itself.
-
- \E[1t
-
- open
- \E[2t
-
- close (become iconic)
- \E[3t
-
- move, with interactive feedback
- \E[3;TOP;LEFTt
-
- move, to
TOP LEFT
(pixel coordinates)
- \E[4t
-
- stretch, with interactive feedback
- \E[4;HT;WIDTHt
-
- stretch, to
HT WIDTH
size (in pixels)
- \E[5t
-
- front
- \E[6t
-
- back
- \E[7t
-
- refresh
- \E[8;ROWS;COLSt
-
- stretch, to
ROWS COLS
size (in characters)
- \E[11t
-
- report if open or iconic by sending
\E[1t or \E[2t
- \E[13t
-
- report position by sending
\E[3;TOP;LEFTt
- \E[14t
-
- report size in pixels by sending
\E[4;HT;WIDTHt
- \E[18t
-
- report size in characters by sending
\E[8;ROWS;COLSt
- \E[20t
-
- report icon label by sending
\E]Llabel\E\
- \E[21t
-
- report tool header by sending
\E]llabel\E\
- \E]ltext\E\
-
- set tool header to
text
- \E]Ifile\E\
-
- set icon to the icon contained in
file;
file
must be in
iconedit
output format
- \E]Llabel\E\
-
- set icon label to
label
- \E[>OPT;...h
-
- turn
SB OPT
on
(OPT
= 1 => pagemode), for example,
\E[>1;3;4h
- \E[>OPT;...k
-
- report
OPT;
sends
\E[>OPTl
or
\E[>OPTh
for each
OPT
- \E[>OPT;...l
-
- turn
OPT
off
(OPT
= 1 => pagemode), for example,
\E[>1;3;4l
See
EXAMPLES
for an example of using this facility.
Selections
Terminal subwindows support a selection facility that allows you
to capture a block of text, move it between windows, and
replicate it.
You can make a selection by clicking the left
button on the mouse at the top-left character of the block to
capture, and then clicking the middle
button on the bottom-right character.
The selected text is highlighted.
Multiple clicks of the
LEFT
mouse button capture:
-
- 1 click
-
a character
- 2 clicks
-
a word
- 3 clicks
-
a line
- 4 clicks
-
a screenful
You can also make a selection by moving the mouse while holding
the select button, and then releasing it.
The selection is deselected if you type any key or new output
is written to the window that holds the selection.
Menu
To manipulate your selection, press the menu button over the terminal
subwindow.
A
ttysw
menu appears with the menu items discussed
below:
- Copy, then Paste
-
When there is a selection in any window,
the entire item is active. Selecting it copies the selection both to
the clipboard and to the insertion point (cursor).
It copies selections in tty, text, command, and panel subwindows, and
It is intended to bridge the gap between
Stuff
and the selection facility (see
[a manual with the abbreviation SVBG].
When there is no selection but there is text
on the clipboard, only
Paste
is active. In this case, the contents of the clipboard are
copied to the insertion point (cursor).
When there is no selection and nothing on the clipboard,
this item is inactive.
- Enable Page Mode
-
- Disable Page Mode
-
Toggle page mode on and off.
Page mode prevents output from scrolling off the screen. It is an
alternative to
more.1
When page mode is on, the cursor changes to resemble a tiny stop-sign
when ever a screenful of output is displayed. To restart output, type
any key, or select the
Continue
menu item that temporarily replaces
Enable Page Mode.
- Stuff
-
is provided for backward compatibility. It
copies the selection to the insertion point (cursor)
as though they had been typed from the keyboard.
Stuff
can only handle selections made in a tty subwindow.
- Flush Input
-
Occasionally the input buffer fills up and the terminal emulator
appears to freeze. If this happens, the
`Flush Input'
appears in the menu; choosing it clears the buffer and
allows you to continue.
EXAMPLES
The following aliases can be put into your
~/.cshrc
file:
-
# dynamically set the name stripe of the tool:
alias header 'echo -n "\E]l\!*\E\"'
# dynamically set the label on the icon:
alias iheader 'echo -n "\E]L\!*\E\"'
# dynamically set the image on the icon:
alias icon 'echo -n "\E]I\!*\E\"'
FILES
- ~/.ttyswrc
-
- /usr/lib/ttyswrc
-
- /usr/demo/*
-
SEE ALSO
cmdtool.1
defaultsedit.1
gfxtool.1
input_from_defaults.1
more.1
rlogin.1c
sunview.1
kbd.4s
termcap.5
[a manual with the abbreviation SVBG]
BUGS
If more than 256 characters are input to a terminal emulator subwindow
without an intervening
NEWLINE,
the terminal emulator may hang.
If this occurs, an alert will come up with a message saying
`Too many keystrokes in input buffer'.
Choosing the
Flush Input Buffer
menu item may correct the problem.
This is a bug for a terminal emulator subwindow running on top of or
rlogin.1c
to a machine with pre-4.0 release kernel.
Created by unroff & hp-tools.
© somebody (See intro for details). All Rights Reserved.
Last modified 11/5/97