GTERM(1)

NAME
gterm — NeWS terminal emulator

SYNOPSIS
gterm [ options ] [ command ]

DESCRIPTION
gterm is a termcap-based terminal emulator program for NeWS. When invoked, it reads the /etc/termcap entry for the terminal named gterm or the termcap named by the -t option, and arranges to emulate the behavior of that terminal. It forks an instance of command (or, by default, the program specified by the SHELL environment variable, or csh if this is undefined), routing keyboard input to the program and displaying its output.

It responds to (most of) the particular escape sequences that termcap defines for that terminal.

OPTIONS

-bg causes gterm to place itself in the background by disassociating itself from the parent process and the controlling terminal. If gterm is invoked with rsh(1), this option will cause the rsh command to complete immediately, rather than hang around until gterm exits. This is the default if gterm is invoked with stdin not connected to a tty.

-C  route /dev/console messages to this window, if supported by the operating system.

-co columns
    specifies the width of the window in characters.

-display hostname
    display the window on hostname's NeWS server.

-F font
    overrides the default terminal font.

-f  Ignored. For compatibility with older versions.

-fg forces gterm not to fork, thus leaving you in the forground.

-fl frame label
    Use the specified string for the frame label.

-fs fontsize
    overrides the default terminal font point size.

-ic forces gterm to come up iconic instead of as an open window.

-il icon label
    Use the specified string for the icon label. The icon label normally defaults to the name of the host on which gterm is running.

-ixy x y
    sets the initial icon location. Similar to -xy x y.

-li lines
    specifies the height of the window in characters.

-ls causes gterm to invoke the shell as a login shell. In addition, any specified command will be passed to the shell with a -c option, rather than being invoked directly, so that the shell can establish any environment variables that may be needed by the command. Further, if gterm is invoked via rsh(1), the host at the other end of the rsh socket will be used as the server, unless a NEWSSERVER environment variable is present.

-pm specifies that a gterm should enable page mode. When page mode is enabled and a command produces more lines of output that can fit on the screen at once, gterm will stop scrolling, hide the cursor, and wait until the user types a character before resuming output. When gterm is blocked with a screenfull of data, typing a carriage return or space will cause scrolling to proceed by one line or one screenful, respectively; any other character will cause the next screenfull to appear and be passed through as normal input. This mode can also be enabled or disabled interactively, using the Page Mode menu item.

-r  forces gterm to reload the gterm.rc file and the .gtermrc file. Normally, gterm checks and if the dictionary GTermDict_? exists in systemdict, it does not bother reloading the PostScript files.

-sl savelines
    specify the length of the scroll region. Defaults to 0, which turns scrollbars off.

-t term
    specify a particular terminal type to override the TERM environment variable. Some types work well, others do not. The terminal type ``psterm'' was designed specifically for use with gterm, and works extreamly well.

-ui userinit
    gterm will execute userinit as a PostScript function before creating the terminal window. This allows the overriding of terminal characteristics on an individual window basis. The only function currently defined for this purpose is -ui StretchOpen which requests a sizing box on window creation instead of a fixed size window. See the example .gtermrc file for more code that can be called from here.

-w  wait around after the command terminates.

-xy x y
    specifies the location of the lower left hand corner of the window (in screen pixel coordinates).

SELECTION

Clicking the left mouse button over a character selects that character. Dragging the mouse extends the selection. Clicking or dragging beyond the end of the line selects the newline at the end of that line. Clicking the middle mouse button over a character when a selection does not exist in that window selects that character. Clicking the middle mouse button over a character when a selection does exist in that window extends or shrinks the selection to that character. Dragging the mouse still extends the selection.

Clicking and dragging with a shift key down selects a rectangle of text, padded with spaces if necessary.

The Copy key (L6) copies the selection to the shelf. The Paste key (L8) copies the contents of the shelf to the insertion point .

Copy and Paste of selections works across separate invocations of gterm. They do not work between gterm and SunView. However, a mechanism does exist for transferring a SunView selection to the shelf, and vice versa. See the description of Selection Transfer in news_server(1).

MENU ITEMS
gterm creates a client menu with entries to stuff the current selection to the insertion point, get at the normal frame menu, and get at a config menu for changing some parameters of a running gterm. Under the config menu, are other sub-menus changing various parameters.

Config... Lines x Cols... This menu sets the terminal size to the indicated number of lines and columns. By default, this will change the window size to fit.

Config... Points... This menu sets the font point size. By default, this will change the window size to fit.

Config... Fonts... This menu sets the terminal font to one of the standard fixed width fonts. This is likely to change the size of the characters, and behaves as thought the font size had been changed. Note that /Screen font (the default) only scales to a few predetermined sizes. Selecting a new point size is likely to have no effect until a fully scalable font is selected. Several other fonts exibit this behavior. See More Fonts!... below.

Config... More Fonts!... This menu lists all fonts known to the system at the time the gterm was started. Note that some of these are likely to be silly. The width of the letter ``m'' in the font is used to determine the spacing between characters. Some fonts have no ``m'' character. See Config... Toggles... Var Width Fonts below.

Config... Resizing stuff... This menu is strange. Under it are three pairs of toggles. These toggles control the behavior of gterm when one of three parameters is changed. Basically, there are three parameters used to determine the way the terminal is displayed, and they are all interdependant. The three parameters are Font Size, Lines/Cols, and Window Size. Fixing values for any two of these determines the third value. When you change one of these parameters, gterm consults this menu to determine which of the other two parameters should stay the same, and which should change. The parameter with the ``*'' next to it will be the one which changes. Select the menu entry for the unstarred parameter to cause it to become the new starred parameter. Remember that you choose among three independant pairs of values. Now, go play.

Config... Save Lines... This menu selects the number of lines saved. If you select a value other than zero, a scrollbar will appear allowing you to scroll through the saved region. Selecting zero will remove the scrollbar. Saving a large number of lines takes a lot of memory, and possibly several seconds to set up.

Config... Toggles... This menu controls the on/off state of several items. Select the item to toggle it. If there is an ``*'' next to an item, it is on now, and selecting it will turn it off. The first item is Page Mode. See the -pm option above. The second item is Auto Margins. The initial state of this item is determined from the termcap entry for the terminal being emulated. If Auto Margins is on, when the terminal's cursor is in the rightmost column and another character needs to be displayed, a newline will automatically be inserted. If Auto Margins is off, the cursor will ``stick'' to the right of the window. The third item is Var Width Fonts, and defaults to on. This item is only of importance if the current font is not a fixed width font. Basically, if it is off, all fonts are forced to be fixed width. With Var Width Fonts on, normal output will be more readable under a variable width font, like /Times-Roman, but columns of text will not line up properly, and cursor motion and selection of text can produce wierd effects. This should be fun to play with. The fourth item is Fast Repaint, defaulting to on. If you turn it off, then every repaint will be seen, even if another is already in progress. The fifth item is Scrolling Allowed, defaulting to on. This is here in case your server can repaint faster than it can do a copyarea. On a Silicon Graphics, you might want to turn this off by default. Just set DefaultUseCopyArea to false in your .gtermrc file.

Config... Set Labels... This menu allows you to set the value of the frame label, the icon label, or both. Label values are set to the contents of the current selection. You can also set the frame label to a string indicating what version of gterm you are running.

FILES
/etc/termcap
    to find the terminal description.
${NEWSHOME}/gterm_1lte1.psh
    containing the PostScript code for LiteWindows/NeWS 1.1.
${NEWSHOME}/gterm1lte2.psh
    containing the PostScript code for LiteWindow/OpenWindows 2.0.
${NEWSHOME}/gtermstart.psh
    containing the PostScript code to load the right toolkit adaptor file, ie. one of the gterm?XXXX.psh files.
~/.gtermrc
    to customize the terminal on startup.

SEE ALSO
news_server(1)

NeWS Manual

BUGS

A bug in liteUI causes keyboard events to be distributed to the wrong place. This may cause characters that you type to not go to the terminal that your mouse pointer is inside of. To redirect the keyboard properly, move the mouse out of the window, and back in. This is often necessary when initially starting gterm.

Another obscure bug in liteUI can cause NeWS to think that your shift key is permanently stuck down. It is triggered by holding the shift key down, and clicking on the mouse while dragging it across canvas boundries as you might while making rectangular selections. If this happens, you will have to exit NeWS to reset it. As an emergency measure, it is suggested that you have an alias in your .cshrc file to set the lcase tty parameter.

alias STTY stty lcase

will work for this.

Emulating some terminal types works better than others, largely because there are incomplete /etc/termcap entries for them.

A large number of termcap fields have yet to be implemented.

Page Mode gets easily confused.

See the BUGS and README files distributed with the source.