ftp://ftp.jp.xemacs.org/pub/NetBSD/packages/distfiles/xscreensaver-4.15.tar.gz
[xscreensaver] / hacks / phosphor.man
index 989150ec46367b1a6d0fc3e1da49f16f11c7335b..f954c18935276713cf1846bb9015576b01bf7d8b 100644 (file)
@@ -19,10 +19,12 @@ phosphor - simulates an old terminal with long-sustain phosphor
 [\-display \fIhost:display.screen\fP] [\-window] [\-root] [\-install]
 [\-visual \fIvisual\fP] [\-font \fIfont\fP] [\-scale \fIint\fP]
 [\-ticks \fIint\fP] [\-delay \fIusecs\fP] [\-program \fIcommand\fP]
+[\-meta] [\-esc] [\-bs] [\-del]
 .SH DESCRIPTION
 The \fIphosphor\fP program draws text on the screen in a very large 
 pixelated font that looks like an old low resolution dumb tty.  The
-pixels flare and fade out as if the phosphor was very long-sustain.
+pixels flare and fade out as if the phosphor was very
+long-sustain.  It is also a fully functional vt100 terminal emulator.
 .SH OPTIONS
 .I phosphor
 accepts the following options:
@@ -55,25 +57,21 @@ The number of colors to use when fading to black.  Default 20.
 The speed of the terminal: how long to wait between drawing each character.
 Default 50000, or about 1/20th second.
 .TP 8
+.B \-pty
+Launch the sub-program under a PTY, so that it can address the screen
+directly.  This is the default.
+.TP 8
+.B \-pipe
+Launch the sub-program at the end of a pipe: do not let it address the
+screen directly.
+.TP 8
 .B \-program \fIsh-command\fP
-The command to run to generate the text to display.  This option may be
-any string acceptable to /bin/sh.  The program will be run at the end of
-a pipe, and any characters that it prints to \fIstdout\fP will be printed
-on phosphor's window.  The characters will be printed artificially slowly,
-as per the \fI\-delay\fP option above.  If the program exits, it will be
-launched again after 5 seconds.
-
-Note that phosphor is \fInot\fP a terminal emulator: programs that try to
-directly address the screen will not do what you might expect.  Phosphor
-merely draws the characters on the screen left to right, top to bottom.
-Lines wrap when they reach the right edge, and the screen scrolls when
-characters reach the bottom.
-
-In other words, programs like
-.BR fortune (1)
-will work, but programs like
-.BR top (1)
-won't.
+The command to run to generate the text to display.  This option may
+be any string acceptable to /bin/sh.  The program will be run at the
+end of a pty or pipe, and any characters that it prints to \fIstdout\fP
+will be printed on phosphor's window.  The characters will be printed
+artificially slowly, as per the \fI\-delay\fP option above.  If the
+program exits, it will be launched again after 5 seconds.
 
 For example:
 .EX
@@ -81,7 +79,48 @@ phosphor -program 'cat /usr/src/linux*/README'
 phosphor -program 'ping localhost'
 phosphor -program 'ps -e'
 phosphor -program 'od -txC -w6 /dev/random'
+phosphor -scale 2 -geom =1280x1024 -program 'top'
+phosphor -scale 4 -geom =1280x1024 \\
+         -program 'mtr www.kernel.org'
+phosphor -program 'xemacs -nw -q -f life'
+phosphor -scale 5 -geom =1280x1024 \\
+         -program 'xemacs -nw -q --eval "(hanoi 5)"'
+.EE
+You can also use \fIphosphor\fP as a lo-fi replacement for the
+.BR xterm (1)
+and
+.BR gnome-terminal (1)
+terminal emulators:
+.EX
+phosphor -delay 0 -program tcsh
 .EE
+.TP 8
+.B \-esc
+When the user types a key with the Alt or Meta keys held down, send an
+ESC character first.  This is the default.
+.TP 8
+.B \-meta
+When Meta or Alt are held down, set the high bit on the character instead.
+.TP 8
+.B \-del
+Swap Backspace and Delete.  This is the default.
+.TP 8
+.B \-bs
+Do not swap Backspace and Delete.
+.SH TERMINAL EMULATION
+By default, \fIphosphor\fP allocates a pseudo-tty for the sub-process to
+run under.  This has the desirable side effect that the program will be
+able to use
+.BR ioctl (2)
+to fetch information about terminal parameters and window size, which
+many programs (such as
+.BR top (1))
+need to run properly. \fIphosphor\fP will also set the environment
+variable \fITERM\fP to \fIvt100\fP in the child process.
+
+Any characters typed on the phosphor window will be passed along to
+the sub-process.  (Note that this only works when running in "window"
+mode, not when running in \fI\-root\fP mode under xscreensaver.)
 .SH ENVIRONMENT
 .PP
 .TP 8
@@ -91,6 +130,9 @@ to get the default host and display number.
 .B XENVIRONMENT
 to get the name of a resource file that overrides the global resources
 stored in the RESOURCE_MANAGER property.
+.TP 8
+.B TERM
+to inform the sub-process of the type of terminal emulation.
 .SH SEE ALSO
 .BR xscreensaver (1),
 .BR fortune (1),
@@ -102,7 +144,8 @@ stored in the RESOURCE_MANAGER property.
 .BR webcollage (1),
 .BR driftnet (1)
 .BR EtherPEG ,
-.BR EtherPeek
+.BR EtherPeek ,
+.BR console_codes (4).
 .SH COPYRIGHT
 Copyright \(co 1999 by Jamie Zawinski.  Permission to use, copy, modify, 
 distribute, and sell this software and its documentation for any purpose is 
@@ -113,3 +156,4 @@ suitability of this software for any purpose.  It is provided "as is" without
 express or implied warranty.
 .SH AUTHOR
 Jamie Zawinski <jwz@jwz.org>, 27-Apr-99.
+Pty and vt100 emulation by Fredrik Tolf <fredrik@dolda2000.com>.