http://www.jwz.org/xscreensaver/xscreensaver-5.07.tar.gz
[xscreensaver] / hacks / phosphor.man
1 .de EX          \"Begin example
2 .ne 5
3 .if n .sp 1
4 .if t .sp .5
5 .nf
6 .in +.5i
7 ..
8 .de EE
9 .fi
10 .in -.5i
11 .if n .sp 1
12 .if t .sp .5
13 ..
14 .TH XScreenSaver 1 "5-May-2004" "X Version 11"
15 .SH NAME
16 phosphor - simulates an old terminal with long-sustain phosphor
17 .SH SYNOPSIS
18 .B phosphor
19 [\-display \fIhost:display.screen\fP] [\-window] [\-root] [\-install]
20 [\-visual \fIvisual\fP] [\-font \fIfont\fP] [\-scale \fIint\fP]
21 [\-ticks \fIint\fP] [\-delay \fIusecs\fP] [\-program \fIcommand\fP]
22 [\-meta] [\-esc] [\-bs] [\-del]
23 [\-fps]
24 .SH DESCRIPTION
25 The \fIphosphor\fP program draws text on the screen in a very large 
26 pixelated font that looks like an old low resolution dumb tty.  The
27 pixels flare and fade out as if the phosphor was very
28 long-sustain.  It is also a fully functional vt100 terminal emulator.
29 .SH OPTIONS
30 .I phosphor
31 accepts the following options:
32 .TP 8
33 .B \-window
34 Draw on a newly-created window.  This is the default.
35 .TP 8
36 .B \-root
37 Draw on the root window.
38 .TP 8
39 .B \-install
40 Install a private colormap for the window.
41 .TP 8
42 .B \-visual \fIvisual\fP\fP
43 Specify which visual to use.  Legal values are the name of a visual class,
44 or the id number (decimal or hex) of a specific visual.
45 .TP 8
46 .B \-font \fIfont-name\fP
47 The X font to use.  Phosphor can take any font and scale it up to pixelate
48 it.  The default is \fIfixed\fP.
49 .TP 8
50 .B \-scale \fIint\fP
51 How much to scale the font up: in other words, the size in real pixels of
52 the simulated pixels.  Default 6.
53 .TP 8
54 .B \-ticks \fIint\fP
55 The number of colors to use when fading to black.  Default 20.
56 .TP 8
57 .B \-delay \fIusecs\fP
58 The speed of the terminal: how long to wait between drawing each character.
59 Default 50000, or about 1/20th second.
60 .TP 8
61 .B \-pty
62 Launch the sub-program under a PTY, so that it can address the screen
63 directly.  This is the default.
64 .TP 8
65 .B \-pipe
66 Launch the sub-program at the end of a pipe: do not let it address the
67 screen directly.
68 .TP 8
69 .B \-program \fIsh-command\fP
70 The command to run to generate the text to display.  This option may
71 be any string acceptable to /bin/sh.  The program will be run at the
72 end of a pty or pipe, and any characters that it prints to \fIstdout\fP
73 will be printed on phosphor's window.  The characters will be printed
74 artificially slowly, as per the \fI\-delay\fP option above.  If the
75 program exits, it will be launched again after 5 seconds.
76
77 For example:
78 .EX
79 phosphor -program 'cat /usr/src/linux*/README'
80 phosphor -program 'ping localhost'
81 phosphor -program 'ps -e'
82 phosphor -program 'od -txC -w6 /dev/random'
83 phosphor -program 'cat /dev/random'
84 phosphor -scale 2 -geom =1280x1024 -program 'top'
85 phosphor -scale 4 -geom =1280x1024 \\
86          -program 'mtr www.kernel.org'
87 phosphor -program 'xemacs -nw -q -f life'
88 phosphor -scale 5 -geom =1280x1024 \\
89          -program 'xemacs -nw -q --eval "(hanoi 5)"'
90 .EE
91 If you have the
92 .BR festival (1)
93 text-to-speech system installed, you can have it read the screen as
94 phosphor prints it:
95 .EX
96 phosphor -program \\
97     'xscreensaver-text | tee /dev/stderr | festival --tts'
98 .EE
99 You can also use \fIphosphor\fP as a lo-fi replacement for the
100 .BR xterm (1)
101 and
102 .BR gnome-terminal (1)
103 terminal emulators:
104 .EX
105 phosphor -delay 0 -program tcsh
106 .EE
107 .TP 8
108 .B \-esc
109 When the user types a key with the Alt or Meta keys held down, send an
110 ESC character first.  This is the default.
111 .TP 8
112 .B \-meta
113 When Meta or Alt are held down, set the high bit on the character instead.
114 .TP 8
115 .B \-del
116 Swap Backspace and Delete.  This is the default.
117 .TP 8
118 .B \-bs
119 Do not swap Backspace and Delete.
120 .TP 8
121 .B \-fps
122 Display the current frame rate and CPU load.
123 .SH TERMINAL EMULATION
124 By default, \fIphosphor\fP allocates a pseudo-tty for the sub-process to
125 run under.  This has the desirable side effect that the program will be
126 able to use
127 .BR ioctl (2)
128 to fetch information about terminal parameters and window size, which
129 many programs (such as
130 .BR top (1))
131 need to run properly. \fIphosphor\fP will also set the environment
132 variable \fITERM\fP to \fIvt100\fP in the child process.
133
134 Any characters typed on the phosphor window will be passed along to
135 the sub-process.  (Note that this only works when running in "window"
136 mode, not when running in \fI\-root\fP mode under xscreensaver.)
137 .SH ENVIRONMENT
138 .PP
139 .TP 8
140 .B DISPLAY
141 to get the default host and display number.
142 .TP 8
143 .B XENVIRONMENT
144 to get the name of a resource file that overrides the global resources
145 stored in the RESOURCE_MANAGER property.
146 .TP 8
147 .B TERM
148 to inform the sub-process of the type of terminal emulation.
149 .SH SEE ALSO
150 .BR xscreensaver (1),
151 .BR xscreensaver-text (1),
152 .BR fortune (1),
153 .BR apple2 (MANSUFFIX),
154 .BR starwars (MANSUFFIX),
155 .BR fontglide (MANSUFFIX),
156 .BR ljlatest (MANSUFFIX),
157 .BR dadadodo (1),
158 .BR webcollage (MANSUFFIX),
159 .BR driftnet (1)
160 .BR EtherPEG ,
161 .BR EtherPeek ,
162 .BR console_codes (4).
163 .SH COPYRIGHT
164 Copyright \(co 1999 by Jamie Zawinski.  Permission to use, copy, modify, 
165 distribute, and sell this software and its documentation for any purpose is 
166 hereby granted without fee, provided that the above copyright notice appear 
167 in all copies and that both that copyright notice and this permission notice
168 appear in supporting documentation.  No representations are made about the 
169 suitability of this software for any purpose.  It is provided "as is" without
170 express or implied warranty.
171 .SH AUTHOR
172 Jamie Zawinski <jwz@jwz.org>, 27-Apr-99.
173 Pty and vt100 emulation by Fredrik Tolf <fredrik@dolda2000.com>.