http://ftp.ksu.edu.tw/FTP/FreeBSD/distfiles/xscreensaver-4.24.tar.gz
[xscreensaver] / hacks / phosphor.man
index 3d1fbe12d0e9ef0b087229700c4a234720148cd5..3bf54aa3f1f9c261542122556cc792cf6c5037cd 100644 (file)
@@ -11,7 +11,7 @@
 .if n .sp 1
 .if t .sp .5
 ..
-.TH XScreenSaver 1 "30-Oct-99" "X Version 11"
+.TH XScreenSaver 1 "5-May-2004" "X Version 11"
 .SH NAME
 phosphor - simulates an old terminal with long-sustain phosphor
 .SH SYNOPSIS
@@ -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,31 +57,79 @@ 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.
 
-Here's a good trick, to get phosphor to display recent web search terms:
+For example:
+.EX
+phosphor -program 'cat /usr/src/linux*/README'
+phosphor -program 'ping localhost'
+phosphor -program 'ps -e'
+phosphor -program 'od -txC -w6 /dev/random'
+phosphor -program 'cat /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
+If you have the
+.BR festival (1)
+text-to-speech system installed, you can have it read the screen as
+phosphor prints it:
 .EX
 phosphor -program \\
-  'wget -qO- http://webcrawler.com/cgi-bin/SearchTicker'
+    'xscreensaver-text | tee /dev/stderr | festival --tts'
+.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
@@ -89,10 +139,23 @@ 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 wget (1),
-.BR X (1),
-.BR xscreensaver (1)
+.BR xscreensaver (1),
+.BR xscreensaver-text (1),
+.BR fortune (1),
+.BR apple2 (MANSUFFIX),
+.BR starwars (MANSUFFIX),
+.BR fontglide (MANSUFFIX),
+.BR ljlatest (MANSUFFIX),
+.BR dadadodo (1),
+.BR webcollage (MANSUFFIX),
+.BR driftnet (1)
+.BR EtherPEG ,
+.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 
@@ -103,3 +166,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>.