sourCEntral - mobile manpages

pdf

WY60

NAME

wy60 − curses based emulator for the Wyse 60™ terminal

SYNOPSIS

wy60

-c --command command ] [ -h --help ] [ -j --job-control on off } ] [ -l --login ] [ -o --option key=value ] [ -t --term terminal ] [ -v --version ] [ -- ] shell arguments

DESCRIPTION

The wy60 utility program invokes a new shell or command and adjusts the $TERM environment variable to have a value of wyse60. All commands executed within this shell or any of its child processes automatically have their terminal escape sequences translated to be processed by the terminal that wy60 was invoked from.

Unless a different command was requested, the user’s default shell as determined by the value of the $SHELL environment variable is invoked. If the environment variable has not been set, then the default system shell /bin/sh is used instead. This value can be overridden in the configuration file.

OPTIONS

Parameters are parsed until the first unknown parameter is encountered, or until the special parameter -- is found. All the following parameters are passed on to the inferior shell or to the user specified command. Check the manual page for sh(1) for a detailed list of options.

The following parameters are directly understood by wy60 and will not be forwarded to any child process unless they appear after the -- marker or after another set of unknown parameters:
-c 
--command command

Rather than invoking the user’s shell, run the specified command, instead.

-h --help

Display a brief usage message showing the valid command line parameters.

-j --job-control on off }

Enable or disable job control. If the parent process is a shell that supports job control then wy60 can enable this capability for its children by forking an additional process monitoring the children. By default, this option is enabled.

-l --login

Invoke the inferior shell as a login shell. This is done by prepending a minus character to the application name. This convention is supported by all shells but probably gets ignored by most other applications. The --login parameter is ignored if the --command parameter has also been given.

As a special case, it is possible to make wy60 a user’s default login shell. To do so, wy60 must be entered into the shells(5) file and you must call chsh(1) to change the user’s default shell. If the emulator detects that it is invoked as a wrapper for a shell, it ignores all command line parameters. It then resets $SHELL to the value specified in the configuration file or to /bin/sh and launches that shell passing all the parameters that were given to wy60.

-o --option key=value

All of the configuration variables listed later in this document can also be overriden on the command line. The syntax is identical to the one used in the configuration files.

When using this option, it might be neccessary to quote the key/value pair to prevent the shell from expanding escape sequences.

-t --term terminal

Override the value of the $TERM environment variable. If this parameter is not present, then a default of wyse60 will be used for the value that is passed to the inferior shell.

-v --version

Display the version number of the program and the date when it was compiled.

--

All parameters following this argument will be literally passed to the inferior shell.

EXAMPLES

wy60

If invoked without parameters, an interactive shell is invoked.

wy60 −c emacs −nw README

The −c parameter can be used to directly invoke an interactive application that should run in an emulated environment. The emulator will terminate when the invoked application has quit.

wy60 −c infocmp

use infocmp(1M) to verify that the terminfo(5) database has appropriate entries for the emulated wyse60 terminal.

CONFIGURATION FILES

Some of the execution parameters can be controlled through configuration files. Every user can have a private configuration file in $HOME/.wy60rc that overrides any system-wide settings. The system administrator can also set global parameters in /etc/wy60.rc.

All configuration files are in plain ASCII format. Comments are introduced by the hash mark # character and extend to the end of the line. Blank lines are ignored. All lines are of the form variable = value. Variable names are case insensitive. Leading and trailing white space for both the variables and the values is stripped prior to processing. Non ASCII characters have to be escaped:

\ooo

Up to three octal digits can be used to specify a character in the range \001 through \177.

\xXX

Up to two hexadecimal digits can be used to specify a character in the range \x01 through \xFF.

\a

The BEL character (ASCII 7).

\b

The BS character (ASCII 8).

\e

The ESC character (ASCII 27).

\f

The FF character (ASCII 12).

\n

The NL character (ASCII 10).

\r

The CR character (ASCII 13).

\t

The TAB character (ASCII 9).

\v

The VT character (ASCII 11).

Please note that continuation lines are not supported and that is not possible to input a NUL character (ASCII 0).

The configuration file supports the following parameters:
IDENTIFIER

The terminal identifier string that is reported when an ENQ (ASCII 5) is received, can be overridden by setting the IDENTIFIER configuration variable. If this option is not set, then the emulator replies with an ACK (ASCII 6).

PRINTCOMMAND

Programs can print to a local printer by sending escape codes to wy60. If this variable is set to "auto" then wy60 will try to print to either lp(1) or to lpr(1). Otherwise, this variable should contain the name of a script that can accept data on its standard input.

RESIZE

If you want to use an external script to resize the console, then you can specify the absolute path to this script by setting the RESIZE configuration variable. For example, if you have SVGATextMode(8) installed and you want to run wy60 from the Linux text console, then you might try using a script such as this one:

img

Make sure that SVGATextMode(8) understands these modes: 80x24, 80x25, 80x42, 80x43, 132x24, 132x25, 132x42, 132x43.

SHELL

If neither a command has been passed on the command line, nor the user’s $SHELL environment variable was set, then use this variable to determine the default shell. If the variable is not set, then a value of /bin/sh is used instead.

TERM

If no terminal type has been specified on the command line, the program defaults to wyse60. This default value can by overridden by setting the TERM configuration variable.

WRITEPROTECT

The default attribute for indicating write-protect mode is REVERSE. This value can be overridden by setting the WRITEPROTECT configuration variable to one of these values: NORMALBLANKBLINKREVERSEUNDERSCOREDIM. The attributes can be combined with each other by listing multiple in the same line.

All the other variables specify character sequences that should be sent whenever the user presses a function key. The following table lists the variable name, the default value, and the terminfo(5) name for the function key.

img

EXIT STATUS

0

Successful program execution.

125

The inferior shell or command terminated abnormally.

126

The emulator has been terminated by an unexpected signal.

127

Some fatal error prevented or aborted the execution of wy60.

Other

The inferior shell or command returned a non-zero exit status.

DIAGNOSTICS

The most common cause for the emulator to fail is the $TERM environment variable not being set or the terminal having insufficient capabilities. If this happens, try using a more powerful terminal type and also use infocmp(1M) to verify that your terminfo(5) database is configured correctly.

You might also see an error message saying that the terminal size could not be determined. wy60 requires that the terminal settings have been configured properly prior to invoking the emulator. This usually happens at the time when you log into the system, but you can also adjust the values by calling stty(1).

If the emulator complains that it cannot launch the child process then verify that $SHELL is set and points to a valid shell.

FILES

$HOME/.wy60rc

Per-user configuration settings.

/etc/wy60.rc

System-wide configuration settings (this file must be created manually and does not get overwritten when upgrading wy60).

/usr/share/terminfo/?/*

Files containing terminal descriptions.

ENVIRONMENT

The $TERM environment variable must be set for the emulator to work. If the $SHELL environment variable is set, its value will be used for launching the inferior shell. Otherwise a default filename is taken from the configuration files or /bin/sh is used.

The emulator sets the $TERM, $COLUMNS, and $LINES environment variables for its child processes.

SEE ALSO

chsh(1), infocmp(1M), lp(1), lpr(1), sh(1), shells(5), stty(1), SVGATextMode(8), terminfo(5), tput(1), xterm(1).

SECURITY

The program can be executed with normal user privileges. As such, the amount of damage that a malicious application could cause is limited to the user’s account. To the best of the author’s knowledge the current version of wy60 does not have any security issues, but common sense should still be used whenever running any untrusted software within the emulator.

AUTHOR

Copyright (C) 2001, 2002 by Markus Gutschke <markus+wy60 AT wy60 DOT gutschke DOT com>.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

MAILING LIST

There is a low-traffic mailing list for the discussion of this program at http://gutschke.com/cgi-bin/mailman/listinfo/Wy60.

TRADEMARKS

Wyse and Wyse 60 are trademarks or registered trademarks of Wyse Technology, Inc.

BUGS

The emulator attempts to seamlessly switch to wyse60 emulation. This requires the ability to query the host terminal for its cursor position at the time when the emulator is started. As terminfo(5) does not provide this capability, wy60 can only support seamless switching on a small number of well known terminal types. If it does not recognize the terminal type, then the screen will be cleared at startup.

The escape sequences for setting the screen size can only be processed if the host terminal supports dynamic resizing under program control. Currently, xterm(1) appears to be the only program that has this capability.

Function keys work only if the host terminal generates distinct character sequences for each of them and if the terminfo(5) entry for the host terminal is correct. Frequently one or the other is not the case which limits the usability of the emulator. Testing has shown, that the most correct implementation appears to be available in very recent versions of xterm(1).

The current version of the emulator supports only a small subset of the full features offered by a real Wyse 60™ terminal. Several of the advanced features are missing. Most notably this means that there is no support for reprogrammable function keys (but you can use the configuration file to assign strings to individual keys) or for the status bar. Frequently, the supported set of escape sequences is sufficient to run an application within the emulated environment, but if that does not work, you should consider either filing a detailed bug report with the author or you should switch to using a hardware terminal.

pdf