1 |
-------------------------------------------------------------------------- |
2 |
FAQ |
3 |
-------------------------------------------------------------------------- |
4 |
|
5 |
----- |
6 |
|
7 |
Q: How do I know which rxvt version I'm using? |
8 |
|
9 |
A: The version number is displayed with the usage (-h). |
10 |
For rxvt version 2.14 and later, the escape sequence `ESC[8n' |
11 |
sets the window title to the version number. |
12 |
|
13 |
----- |
14 |
|
15 |
Q: Mouse cut/paste suddenly no longer works. |
16 |
|
17 |
A: Make sure that mouse reporting is actually turned off since |
18 |
killing some editors prematurely may leave the mouse in mouse |
19 |
report mode. I've heard that tcsh may use mouse reporting |
20 |
unless it otherwise specified. A quick check is to see if |
21 |
cut/paste works when the Alt or Shift keys are depressed. See |
22 |
doc/refer.txt |
23 |
|
24 |
----- |
25 |
|
26 |
Q: What's with this bold/blink stuff? I can never get blinking text! |
27 |
|
28 |
A: It is not possible, and likely will never be, for rxvt to have |
29 |
actual blinking text. Instead (if rxvt was compiled without |
30 |
NO_BOLDCOLOR), bold/blink attributes are used to set high-intensity |
31 |
foreground/background colors ... like what you'd see on a PC video |
32 |
adapter. There are programs, notably John Davis' SLang-based ones |
33 |
<ftp://space.mit.edu/pub/davis>, that use bold/blink attributes to |
34 |
permit 16 colors. |
35 |
|
36 |
color0-7 are the low-intensity colors. |
37 |
color8-15 are the corresponding high-intensity colors. |
38 |
|
39 |
A side issue of this bold/blink stuff is the question of how the |
40 |
normal default foreground/background colors are to be treated. If |
41 |
the default foreground/background match one of the low-intensity |
42 |
colors (color0-7), the bold/blink attribute will invoke the |
43 |
appropriate high-intensity color (color8-15). |
44 |
|
45 |
In the case that the default foreground doesn't match one of the |
46 |
low-intensity colors, the bold attribute will use an `overstrike' |
47 |
to simulate a bold font. But note this leaves pixel-droppings and |
48 |
so, rather than wasting an inordinate amounts of energy to fix it, |
49 |
its use is simply deprecated. |
50 |
|
51 |
In the case that the default background doesn't match one of the |
52 |
low-intensity colors, the blink attribute is simply ignored |
53 |
(rather than representing it as bold as xterm does). |
54 |
|
55 |
----- |
56 |
|
57 |
Q: I don't like the screen colors. How do I change them? |
58 |
|
59 |
A: You can change the screen colors at run-time using ~/.Xdefaults |
60 |
resources (or as long-options) ... see the man-page. |
61 |
|
62 |
Here are values that are supposed to resemble a VGA screen, |
63 |
including the murky brown that passes for low-intensity yellow: |
64 |
|
65 |
Rxvt*color0: #000000 |
66 |
Rxvt*color1: #A80000 |
67 |
Rxvt*color2: #00A800 |
68 |
Rxvt*color3: #A8A800 |
69 |
Rxvt*color4: #0000A8 |
70 |
Rxvt*color5: #A800A8 |
71 |
Rxvt*color6: #00A8A8 |
72 |
Rxvt*color7: #A8A8A8 |
73 |
|
74 |
Rxvt*color8: #000054 |
75 |
Rxvt*color9: #FF0054 |
76 |
Rxvt*color10: #00FF54 |
77 |
Rxvt*color11: #FFFF54 |
78 |
Rxvt*color12: #0000FF |
79 |
Rxvt*color13: #FF00FF |
80 |
Rxvt*color14: #00FFFF |
81 |
Rxvt*color15: #FFFFFF |
82 |
|
83 |
----- |
84 |
|
85 |
Q: What's with the strange Backspace/Delete key behaviour? |
86 |
|
87 |
A: Assuming that the physical Backspace key corresponds to the |
88 |
BackSpace keysym (not likely for Linux ... see the following |
89 |
question) there are two standard values that can be used for |
90 |
Backspace: ^H and ^?. |
91 |
|
92 |
Rxvt tries to inherit the current stty settings and uses the value |
93 |
of `erase' to guess the value for backspace. If rxvt wasn't started |
94 |
from a terminal (say, from a menu or by remote shell), then the |
95 |
system value of `erase', which corresponds to CERASE in <termios.h>, |
96 |
will be used (which may not be the same as your stty setting). |
97 |
|
98 |
For starting a new rxvt: |
99 |
|
100 |
use Backspace = ^H |
101 |
$ stty erase ^H |
102 |
$ rxvt |
103 |
|
104 |
use Backspace = ^? |
105 |
$ stty erase ^? |
106 |
$ rxvt |
107 |
|
108 |
NB: generate either value with BackSpace and Ctrl/Shift-BackSpace. |
109 |
Toggle with "ESC[36h" / "ESC[36l" as documented in "doc/refer.txt" |
110 |
|
111 |
For an existing rxvt: |
112 |
use Backspace = ^H |
113 |
$ stty erase ^H |
114 |
$ echo -n "^[[36h" |
115 |
|
116 |
use Backspace = ^? |
117 |
$ stty erase ^? |
118 |
$ echo -n "^[[36l" |
119 |
|
120 |
This helps satisfy some of the Backspace discrepancies that occur, |
121 |
but if you use Backspace = ^?, make sure that the termcap/terminfo |
122 |
value properly reflects that. |
123 |
|
124 |
The Delete key (which one would expect to emit ^?) is a another |
125 |
casualty of the ill-defined Backspace problem. To avoid confusion |
126 |
between the Backspace and Delete keys, the Delete key has been |
127 |
assigned an escape sequence to match the vt100 for Execute (ESC[3~) |
128 |
and is in the supplied termcap/terminfo. |
129 |
|
130 |
Some other Backspace problems: |
131 |
some editors use termcap/terminfo, |
132 |
some editors (vim I'm told) expect Backspace = ^H, |
133 |
GNU Emacs (and Emacs-like editors) use ^H for help. |
134 |
|
135 |
Perhaps someday this will all be resolved in a consistent manner |
136 |
... and maybe xterm will have Home/End values too! |
137 |
|
138 |
----- |
139 |
|
140 |
Q: Why doesn't the Backspace key work on my Linux machine? |
141 |
|
142 |
A: The XFree86 server has a notorious problem of mapping the Backspace |
143 |
key as Delete in order to match the Linux console. |
144 |
|
145 |
The correct way to fix this: |
146 |
|
147 |
0 - Complain to your Linux distributer and the XFree86 team, maybe |
148 |
they'll fix it. |
149 |
|
150 |
1 - Use xmodmap to correct the Backspace mapping |
151 |
|
152 |
! ~/.Xmodmap |
153 |
|
154 |
! a correctly-mapped BackSpace |
155 |
keycode 22 = BackSpace |
156 |
|
157 |
*** Make sure the keycode above matches the physical |
158 |
Backspace key on your machine!! (use xev) *** |
159 |
|
160 |
This will also fix the BackSpace problem with Motif applications, |
161 |
such as ``why doesn't Backspace work for Netscape?'' |
162 |
|
163 |
You now have a Backspace key that functions as described in the |
164 |
previous question. |
165 |
|
166 |
1a - You may also want to fix the regular xterm if it doesn't |
167 |
generates the desired value for BackSpace |
168 |
|
169 |
xterm*vt100.translations: #override \ |
170 |
<Key>BackSpace: string(\010) \n |
171 |
or |
172 |
xterm*vt100.translations: #override \ |
173 |
<Key>BackSpace: string(\177) \n |
174 |
|
175 |
while you are at it, you may also want to have consistent |
176 |
values to Home/End/Delete |
177 |
|
178 |
xterm*vt100.translations: #override \ |
179 |
<Key>Home: string("\033[7~") \n\ |
180 |
<Key>End: string("\033[8~") \n\ |
181 |
<Key>Delete: string("\033[3~") \n |
182 |
|
183 |
Finally, you can also remap the rxvt key-binding at run-time (next |
184 |
question) but you'll lose the ability to have Ctrl/Shift-Backspace |
185 |
work differently as well as losing the escape sequence toggling of |
186 |
Backspace. |
187 |
|
188 |
----- |
189 |
|
190 |
Q: I don't like the key-bindings. How do I change them? |
191 |
|
192 |
A: There are some compile-time selections available via configure. |
193 |
Unless you have run "configure" with the "--disable-resources" |
194 |
option you can use the `keysym' resource to alter the keystrings |
195 |
associated with keysym 0xFF00 - 0xFFFF (function, cursor keys, etc). |
196 |
|
197 |
Here's an example for a tn3270 session started using |
198 |
`rxvt -name tn3270' |
199 |
|
200 |
!# ----- special uses ------: |
201 |
! tn3270 login, remap function and arrow keys. |
202 |
tn3270*font: *clean-bold-*-*--15-* |
203 |
|
204 |
! keysym - used by rxvt only |
205 |
! Delete - ^D |
206 |
tn3270*keysym.0xFFFF: \004 |
207 |
|
208 |
! Home - ^A |
209 |
tn3270*keysym.0xFF50: \001 |
210 |
! Left - ^B |
211 |
tn3270*keysym.0xFF51: \002 |
212 |
! Up - ^P |
213 |
tn3270*keysym.0xFF52: \020 |
214 |
! Right - ^F |
215 |
tn3270*keysym.0xFF53: \006 |
216 |
! Down - ^N |
217 |
tn3270*keysym.0xFF54: \016 |
218 |
! End - ^E |
219 |
tn3270*keysym.0xFF57: \005 |
220 |
|
221 |
! F1 - F12 |
222 |
tn3270*keysym.0xFFBE: \e1 |
223 |
tn3270*keysym.0xFFBF: \e2 |
224 |
tn3270*keysym.0xFFC0: \e3 |
225 |
tn3270*keysym.0xFFC1: \e4 |
226 |
tn3270*keysym.0xFFC2: \e5 |
227 |
tn3270*keysym.0xFFC3: \e6 |
228 |
tn3270*keysym.0xFFC4: \e7 |
229 |
tn3270*keysym.0xFFC5: \e8 |
230 |
tn3270*keysym.0xFFC6: \e9 |
231 |
tn3270*keysym.0xFFC7: \e0 |
232 |
tn3270*keysym.0xFFC8: \e- |
233 |
tn3270*keysym.0xFFC9: \e= |
234 |
|
235 |
! map Prior/Next to F7/F8 |
236 |
tn3270*keysym.0xFF55: \e7 |
237 |
tn3270*keysym.0xFF56: \e8 |
238 |
|
239 |
----- |
240 |
|
241 |
Q: I'm using keyboard model XXX that has extra Prior/Next/Insert keys. |
242 |
How do I make use of them? For example, the Sun Keyboard type 4 |
243 |
has the following mappings that rxvt doesn't recognize. |
244 |
|
245 |
KP_Insert == Insert |
246 |
F22 == Print |
247 |
F27 == Home |
248 |
F29 == Prior |
249 |
F33 == End |
250 |
F35 == Next |
251 |
|
252 |
A: Rather than have rxvt try to accomodate all the various possible |
253 |
keyboard mappings, it is better to use `xmodmap' to remap the |
254 |
keys as required for your particular machine. |
255 |
|
256 |
----- |
257 |
|
258 |
Q: How do I distinguish if I'm running rxvt or a regular xterm? |
259 |
I need this to decide about setting colors etc. |
260 |
|
261 |
A: rxvt always exports the variable "COLORTERM", so you can check and |
262 |
see if that is set. Note that several programs, JED, slrn, Midnight |
263 |
Commander automatically check this variable to decide whether or not |
264 |
to use color. |
265 |
|
266 |
----- |
267 |
|
268 |
Q: How do I set the correct, full IP address for the DISPLAY variable? |
269 |
|
270 |
A: If you've compiled rxvt with DISPLAY_IS_IP then it is |
271 |
possible to use the following shell script snippets to correctly set |
272 |
the display. If your version of rxvt wasn't also compiled with |
273 |
ESCZ_ANSWER (as assumed in these snippets) then the COLORTERM |
274 |
variable can be used to distinguish rxvt from a regular xterm. |
275 |
|
276 |
Courtesy of Chuck Blake <cblake@BBN.COM> with the following shell |
277 |
script snippets: |
278 |
|
279 |
# Bourne/Korn/POSIX family of shells: |
280 |
[ ${TERM:-foo} = foo ] && TERM=xterm # assume an xterm if we don't know |
281 |
if [ ${TERM:-foo} = xterm ]; then |
282 |
stty -icanon -echo min 0 time 15 # see if enhanced rxvt or not |
283 |
echo -n '^[Z' |
284 |
read term_id |
285 |
stty icanon echo |
286 |
if [ ""${term_id} = '^[[?1;2C' -a ${DISPLAY:-foo} = foo ]; then |
287 |
echo -n '^[[7n' # query the rxvt we are in for the DISPLAY string |
288 |
read DISPLAY # set it in our local shell |
289 |
fi |
290 |
fi |
291 |
|
292 |
csh/tcsh family of shells: |
293 |
|
294 |
if ( !(${?TERM}) ) then # if term is unset, we are probably in an xterm |
295 |
TERM = xterm |
296 |
endif |
297 |
if ( ${TERM} =~ xterm ) then |
298 |
stty -icanon -echo min 0 time 15 # see if enhanced rxvt or not |
299 |
echo -n '^[Z' |
300 |
set term_id=$< |
301 |
stty icanon echo |
302 |
if ( ""${term_id} == "^[[?1;2C" && ${?DISPLAY} == 0 ) then |
303 |
echo -n '^[[7n' # query the rxvt we're in for the DISPLAY string |
304 |
setenv DISPLAY "$<" # set it in our local shell |
305 |
endif |
306 |
endif |
307 |
|
308 |
----- |
309 |
|
310 |
Q: How do I compile the manual pages for myself? Where do I obtain |
311 |
yodl from? |
312 |
|
313 |
A: You need to obtain yodl and compile it to make the manual pages |
314 |
from source. The source code for yodl can currently be obtained |
315 |
from http://www.xs4all.nl/~jantien/yodl/index.html |
316 |
-- |
317 |
EOF |