1urxvt(7)                         RXVT-UNICODE                         urxvt(7)
2
3
4

NAME

6       RXVT REFERENCE - FAQ, command sequences and other background
7       information
8

SYNOPSIS

10          # set a new font set
11          printf '\33]50;%s\007' 9x15,xft:Kochi" Mincho"
12
13          # change the locale and tell rxvt-unicode about it
14          export LC_CTYPE=ja_JP.EUC-JP; printf "\33]701;$LC_CTYPE\007"
15
16          # set window title
17          printf '\33]2;%s\007' "new window title"
18

DESCRIPTION

20       This document contains the FAQ, the RXVT TECHNICAL REFERENCE
21       documenting all escape sequences, and other background information.
22
23       The newest version of this document is also available on the World Wide
24       Web at
25       <http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.7.pod>.
26
27       The main manual page for urxvt itself is available at
28       <http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.1.pod>.
29

RXVT-UNICODE/URXVT FREQUENTLY ASKED QUESTIONS

31   Meta, Features & Commandline Issues
32       My question isn't answered here, can I ask a human?
33
34       Before sending me mail, you could go to IRC: "irc.freenode.net",
35       channel "#rxvt-unicode" has some rxvt-unicode enthusiasts that might be
36       interested in learning about new and exciting problems (but not FAQs
37       :).
38
39       I use Gentoo, and I have a problem...
40
41       There are two big problems with Gentoo Linux: first, most if not all
42       Gentoo systems are completely broken (missing or mismatched header
43       files, broken compiler etc. are just the tip of the iceberg); secondly,
44       it should be called Gentoo GNU/Linux.
45
46       For these reasons, it is impossible to support rxvt-unicode on Gentoo.
47       Problems appearing on Gentoo systems will usually simply be ignored
48       unless they can be reproduced on non-Gentoo systems.
49
50       Does it support tabs, can I have a tabbed rxvt-unicode?
51
52       Beginning with version 7.3, there is a perl extension that implements a
53       simple tabbed terminal. It is installed by default, so any of these
54       should give you tabs:
55
56          urxvt -pe tabbed
57
58          URxvt.perl-ext-common: default,tabbed
59
60       It will also work fine with tabbing functionality of many window
61       managers or similar tabbing programs, and its embedding-features allow
62       it to be embedded into other programs, as witnessed by doc/rxvt-tabbed
63       or the upcoming "Gtk2::URxvt" perl module, which features a tabbed
64       urxvt (murxvt) terminal as an example embedding application.
65
66       How do I know which rxvt-unicode version I'm using?
67
68       The version number is displayed with the usage (-h). Also the escape
69       sequence "ESC [ 8 n" sets the window title to the version number. When
70       using the urxvtc client, the version displayed is that of the daemon.
71
72       Rxvt-unicode uses gobs of memory, how can I reduce that?
73
74       Rxvt-unicode tries to obey the rule of not charging you for something
75       you don't use. One thing you should try is to configure out all
76       settings that you don't need, for example, Xft support is a resource
77       hog by design, when used. Compiling it out ensures that no Xft font
78       will be loaded accidentally when rxvt-unicode tries to find a font for
79       your characters.
80
81       Also, many people (me included) like large windows and even larger
82       scrollback buffers: Without "--enable-unicode3", rxvt-unicode will use
83       6 bytes per screen cell. For a 160x?? window this amounts to almost a
84       kilobyte per line. A scrollback buffer of 10000 lines will then (if
85       full) use 10 Megabytes of memory. With "--enable-unicode3" it gets
86       worse, as rxvt-unicode then uses 8 bytes per screen cell.
87
88       How can I start urxvtd in a race-free way?
89
90       Try "urxvtd -f -o", which tells urxvtd to open the display, create the
91       listening socket and then fork.
92
93       How can I start urxvtd automatically when I run urxvtc?
94
95       If you want to start urxvtd automatically whenever you run urxvtc and
96       the daemon isn't running yet, use this script:
97
98          #!/bin/sh
99          urxvtc "$@"
100          if [ $? -eq 2 ]; then
101             urxvtd -q -o -f
102             urxvtc "$@"
103          fi
104
105       This tries to create a new terminal, and if fails with exit status 2,
106       meaning it couldn't connect to the daemon, it will start the daemon and
107       re-run the command. Subsequent invocations of the script will re-use
108       the existing daemon.
109
110       Another option is to use systemd socket-based activation (see
111       systemd.socket(5)). Here is an example of a service unit file and of a
112       socket unit file for the default socket path:
113
114       urxvtd.service
115             [Unit]
116             Description=urxvt terminal daemon
117             Requires=urxvtd.socket
118
119             [Service]
120             ExecStart=/usr/bin/urxvtd -o
121
122       urxvtd.socket
123             [Unit]
124             Description=urxvt terminal daemon socket
125
126             [Socket]
127             ListenStream=%h/.urxvt/urxvtd-%H
128
129             [Install]
130             WantedBy=sockets.target
131
132       How do I distinguish whether I'm running rxvt-unicode or a regular
133       xterm? I need this to decide about setting colours etc.
134
135       The original rxvt and rxvt-unicode always export the variable
136       "COLORTERM", so you can check and see if that is set. Note that several
137       programs, JED, slrn, Midnight Commander automatically check this
138       variable to decide whether or not to use colour.
139
140       How do I set the correct, full IP address for the DISPLAY variable?
141
142       If you've compiled rxvt-unicode with DISPLAY_IS_IP and have enabled
143       insecure mode then it is possible to use the following shell script
144       snippets to correctly set the display. If your version of rxvt-unicode
145       wasn't also compiled with ESCZ_ANSWER (as assumed in these snippets)
146       then the COLORTERM variable can be used to distinguish rxvt-unicode
147       from a regular xterm.
148
149       Courtesy of Chuck Blake <cblake@BBN.COM> with the following shell
150       script snippets:
151
152          # Bourne/Korn/POSIX family of shells:
153          [ ${TERM:-foo} = foo ] && TERM=xterm # assume an xterm if we don't know
154          if [ ${TERM:-foo} = xterm ]; then
155             stty -icanon -echo min 0 time 15 # see if enhanced rxvt or not
156             printf "\eZ"
157             read term_id
158             stty icanon echo
159             if [ ""${term_id} = '^[[?1;2C' -a ${DISPLAY:-foo} = foo ]; then
160                printf '\e[7n'        # query the rxvt we are in for the DISPLAY string
161                read DISPLAY          # set it in our local shell
162             fi
163          fi
164
165       How do I compile the manual pages on my own?
166
167       You need to have a recent version of perl installed as /usr/bin/perl,
168       one that comes with pod2man, pod2text and pod2xhtml (from Pod::Xhtml).
169       Then go to the doc subdirectory and enter "make alldoc".
170
171       Isn't rxvt-unicode supposed to be small? Don't all those features
172       bloat?
173
174       I often get asked about this, and I think, no, they didn't cause extra
175       bloat. If you compare a minimal rxvt and a minimal urxvt, you can see
176       that the urxvt binary is larger (due to some encoding tables always
177       being compiled in), but it actually uses less memory (RSS) after
178       startup. Even with "--disable-everything", this comparison is a bit
179       unfair, as many features unique to urxvt (locale, encoding conversion,
180       iso14755 etc.) are already in use in this mode.
181
182           text    data     bss     drs     rss filename
183          98398    1664      24   15695    1824 rxvt --disable-everything
184         188985    9048   66616   18222    1788 urxvt --disable-everything
185
186       When you "--enable-everything" (which is unfair, as this involves xft
187       and full locale/XIM support which are quite bloaty inside libX11 and my
188       libc), the two diverge, but not unreasonably so.
189
190           text    data     bss     drs     rss filename
191         163431    2152      24   20123    2060 rxvt --enable-everything
192        1035683   49680   66648   29096    3680 urxvt --enable-everything
193
194       The very large size of the text section is explained by the east-asian
195       encoding tables, which, if unused, take up disk space but nothing else
196       and can be compiled out unless you rely on X11 core fonts that use
197       those encodings. The BSS size comes from the 64k emergency buffer that
198       my c++ compiler allocates (but of course doesn't use unless you are out
199       of memory). Also, using an xft font instead of a core font immediately
200       adds a few megabytes of RSS. Xft indeed is responsible for a lot of RSS
201       even when not used.
202
203       Of course, due to every character using two or four bytes instead of
204       one, a large scrollback buffer will ultimately make rxvt-unicode use
205       more memory.
206
207       Compared to e.g. Eterm (5112k), aterm (3132k) and xterm (4680k), this
208       still fares rather well. And compared to some monsters like gnome-
209       terminal (21152k + extra 4204k in separate processes) or konsole
210       (22200k + extra 43180k in daemons that stay around after exit, plus
211       half a minute of startup time, including the hundreds of warnings it
212       spits out), it fares extremely well *g*.
213
214       Why C++, isn't that unportable/bloated/uncool?
215
216       Is this a question? :) It comes up very often. The simple answer is: I
217       had to write it, and C++ allowed me to write and maintain it in a
218       fraction of the time and effort (which is a scarce resource for me).
219       Put even shorter: It simply wouldn't exist without C++.
220
221       My personal stance on this is that C++ is less portable than C, but in
222       the case of rxvt-unicode this hardly matters, as its portability limits
223       are defined by things like X11, pseudo terminals, locale support and
224       unix domain sockets, which are all less portable than C++ itself.
225
226       Regarding the bloat, see the above question: It's easy to write
227       programs in C that use gobs of memory, and certainly possible to write
228       programs in C++ that don't. C++ also often comes with large libraries,
229       but this is not necessarily the case with GCC. Here is what rxvt links
230       against on my system with a minimal config:
231
232          libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x00002aaaaabc3000)
233          libc.so.6 => /lib/libc.so.6 (0x00002aaaaadde000)
234          libdl.so.2 => /lib/libdl.so.2 (0x00002aaaab01d000)
235          /lib64/ld-linux-x86-64.so.2 (0x00002aaaaaaab000)
236
237       And here is rxvt-unicode:
238
239          libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x00002aaaaabc3000)
240          libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00002aaaaada2000)
241          libc.so.6 => /lib/libc.so.6 (0x00002aaaaaeb0000)
242          libdl.so.2 => /lib/libdl.so.2 (0x00002aaaab0ee000)
243          /lib64/ld-linux-x86-64.so.2 (0x00002aaaaaaab000)
244
245       No large bloated libraries (of course, none were linked in statically),
246       except maybe libX11 :)
247
248   Rendering, Font & Look and Feel Issues
249       I can't get transparency working, what am I doing wrong?
250
251       First of all, transparency isn't officially supported in rxvt-unicode,
252       so you are mostly on your own. Do not bug the author about it (but you
253       may bug everybody else). Also, if you can't get it working consider it
254       a rite of passage: ... and you failed.
255
256       Here are four ways to get transparency. Do read the manpage and option
257       descriptions for the programs mentioned and rxvt-unicode. Really, do
258       it!
259
260       1. Use transparent mode:
261
262          Esetroot wallpaper.jpg
263          urxvt -tr -tint red -sh 40
264
265       That works. If you think it doesn't, you lack transparency and tinting
266       support, or you are unable to read.  This method requires that the
267       background-setting program sets the _XROOTPMAP_ID or ESETROOT_PMAP_ID
268       property. Compatible programs are Esetroot, hsetroot and feh.
269
270       2. Use a simple pixmap and emulate pseudo-transparency. This enables
271       you to use effects other than tinting and shading: Just
272       shade/tint/whatever your picture with gimp or any other tool:
273
274          convert wallpaper.jpg -blur 20x20 -modulate 30 background.jpg
275          urxvt -pixmap "background.jpg;:root"
276
277       That works. If you think it doesn't, you lack GDK-PixBuf support, or
278       you are unable to read.
279
280       3. Use an ARGB visual:
281
282          urxvt -depth 32 -fg grey90 -bg rgba:0000/0000/4444/cccc
283
284       This requires XFT support, and the support of your X-server. If that
285       doesn't work for you, blame Xorg and Keith Packard. ARGB visuals aren't
286       there yet, no matter what they claim. Rxvt-Unicode contains the
287       necessary bugfixes and workarounds for Xft and Xlib to make it work,
288       but that doesn't mean that your WM has the required kludges in place.
289
290       4. Use xcompmgr and let it do the job:
291
292         xprop -frame -f _NET_WM_WINDOW_OPACITY 32c \
293               -set _NET_WM_WINDOW_OPACITY 0xc0000000
294
295       Then click on a window you want to make transparent. Replace 0xc0000000
296       by other values to change the degree of opacity. If it doesn't work and
297       your server crashes, you got to keep the pieces.
298
299       Why does rxvt-unicode sometimes leave pixel droppings?
300
301       Most fonts were not designed for terminal use, which means that
302       character size varies a lot. A font that is otherwise fine for terminal
303       use might contain some characters that are simply too wide. Rxvt-
304       unicode will avoid these characters. For characters that are just "a
305       bit" too wide a special "careful" rendering mode is used that redraws
306       adjacent characters.
307
308       All of this requires that fonts do not lie about character sizes,
309       however: Xft fonts often draw glyphs larger than their acclaimed
310       bounding box, and rxvt-unicode has no way of detecting this (the
311       correct way is to ask for the character bounding box, which
312       unfortunately is wrong in these cases).
313
314       It's not clear (to me at least), whether this is a bug in Xft,
315       freetype, or the respective font. If you encounter this problem you
316       might try using the "-lsp" option to give the font more height. If that
317       doesn't work, you might be forced to use a different font.
318
319       All of this is not a problem when using X11 core fonts, as their
320       bounding box data is correct.
321
322       How can I keep rxvt-unicode from using reverse video so much?
323
324       First of all, make sure you are running with the right terminal
325       settings ("TERM=rxvt-unicode"), which will get rid of most of these
326       effects. Then make sure you have specified colours for italic and bold,
327       as otherwise rxvt-unicode might use reverse video to simulate the
328       effect:
329
330          URxvt.colorBD:  white
331          URxvt.colorIT:  green
332
333       Some programs assume totally weird colours (red instead of blue), how
334       can I fix that?
335
336       For some unexplainable reason, some rare programs assume a very weird
337       colour palette when confronted with a terminal with more than the
338       standard 8 colours (rxvt-unicode supports 88). The right fix is, of
339       course, to fix these programs not to assume non-ISO colours without
340       very good reasons.
341
342       In the meantime, you can either edit your "rxvt-unicode" terminfo
343       definition to only claim 8 colour support or use "TERM=rxvt", which
344       will fix colours but keep you from using other rxvt-unicode features.
345
346       Can I switch the fonts at runtime?
347
348       Yes, using an escape sequence. Try something like this, which has the
349       same effect as using the "-fn" switch, and takes effect immediately:
350
351          printf '\33]50;%s\007' "9x15bold,xft:Kochi Gothic"
352
353       This is useful if you e.g. work primarily with japanese (and prefer a
354       japanese font), but you have to switch to chinese temporarily, where
355       japanese fonts would only be in your way.
356
357       You can think of this as a kind of manual ISO-2022 switching.
358
359       Why do italic characters look as if clipped?
360
361       Many fonts have difficulties with italic characters and hinting. For
362       example, the otherwise very nicely hinted font "xft:Bitstream Vera Sans
363       Mono" completely fails in its italic face. A workaround might be to
364       enable freetype autohinting, i.e. like this:
365
366          URxvt.italicFont:        xft:Bitstream Vera Sans Mono:italic:autohint=true
367          URxvt.boldItalicFont:    xft:Bitstream Vera Sans Mono:bold:italic:autohint=true
368
369       Can I speed up Xft rendering somehow?
370
371       Yes, the most obvious way to speed it up is to avoid Xft entirely, as
372       it is simply slow. If you still want Xft fonts you might try to disable
373       antialiasing (by appending ":antialias=false"), which saves lots of
374       memory and also speeds up rendering considerably.
375
376       Rxvt-unicode doesn't seem to anti-alias its fonts, what is wrong?
377
378       Rxvt-unicode will use whatever you specify as a font. If it needs to
379       fall back to its default font search list it will prefer X11 core
380       fonts, because they are small and fast, and then use Xft fonts. It has
381       antialiasing disabled for most of them, because the author thinks they
382       look best that way.
383
384       If you want antialiasing, you have to specify the fonts manually.
385
386       What's with this bold/blink stuff?
387
388       If no bold colour is set via "colorBD:", bold will invert text using
389       the standard foreground colour.
390
391       For the standard background colour, blinking will actually make the
392       text blink when compiled with "--enable-text-blink". Without
393       "--enable-text-blink", the blink attribute will be ignored.
394
395       On ANSI colours, bold/blink attributes are used to set high-intensity
396       foreground/background colours.
397
398       color0-7 are the low-intensity colours.
399
400       color8-15 are the corresponding high-intensity colours.
401
402       I don't like the screen colours.  How do I change them?
403
404       You can change the screen colours at run-time using ~/.Xdefaults
405       resources (or as long-options).
406
407       Here are values that are supposed to resemble a VGA screen, including
408       the murky brown that passes for low-intensity yellow:
409
410          URxvt.color0:   #000000
411          URxvt.color1:   #A80000
412          URxvt.color2:   #00A800
413          URxvt.color3:   #A8A800
414          URxvt.color4:   #0000A8
415          URxvt.color5:   #A800A8
416          URxvt.color6:   #00A8A8
417          URxvt.color7:   #A8A8A8
418
419          URxvt.color8:   #000054
420          URxvt.color9:   #FF0054
421          URxvt.color10:  #00FF54
422          URxvt.color11:  #FFFF54
423          URxvt.color12:  #0000FF
424          URxvt.color13:  #FF00FF
425          URxvt.color14:  #00FFFF
426          URxvt.color15:  #FFFFFF
427
428       And here is a more complete set of non-standard colours.
429
430          URxvt.cursorColor:  #dc74d1
431          URxvt.pointerColor: #dc74d1
432          URxvt.background:   #0e0e0e
433          URxvt.foreground:   #4ad5e1
434          URxvt.color0:       #000000
435          URxvt.color8:       #8b8f93
436          URxvt.color1:       #dc74d1
437          URxvt.color9:       #dc74d1
438          URxvt.color2:       #0eb8c7
439          URxvt.color10:      #0eb8c7
440          URxvt.color3:       #dfe37e
441          URxvt.color11:      #dfe37e
442          URxvt.color5:       #9e88f0
443          URxvt.color13:      #9e88f0
444          URxvt.color6:       #73f7ff
445          URxvt.color14:      #73f7ff
446          URxvt.color7:       #e1dddd
447          URxvt.color15:      #e1dddd
448
449       They have been described (not by me) as "pretty girly".
450
451       Why do some characters look so much different than others?
452
453       See next entry.
454
455       How does rxvt-unicode choose fonts?
456
457       Most fonts do not contain the full range of Unicode, which is fine.
458       Chances are that the font you (or the admin/package maintainer of your
459       system/os) have specified does not cover all the characters you want to
460       display.
461
462       rxvt-unicode makes a best-effort try at finding a replacement font.
463       Often the result is fine, but sometimes the chosen font looks
464       bad/ugly/wrong. Some fonts have totally strange characters that don't
465       resemble the correct glyph at all, and rxvt-unicode lacks the
466       artificial intelligence to detect that a specific glyph is wrong: it
467       has to believe the font that the characters it claims to contain indeed
468       look correct.
469
470       In that case, select a font of your taste and add it to the font list,
471       e.g.:
472
473          urxvt -fn basefont,font2,font3...
474
475       When rxvt-unicode sees a character, it will first look at the base
476       font. If the base font does not contain the character, it will go to
477       the next font, and so on. Specifying your own fonts will also speed up
478       this search and use less resources within rxvt-unicode and the
479       X-server.
480
481       The only limitation is that none of the fonts may be larger than the
482       base font, as the base font defines the terminal character cell size,
483       which must be the same due to the way terminals work.
484
485       Why do some chinese characters look so different than others?
486
487       This is because there is a difference between script and language --
488       rxvt-unicode does not know which language the text that is output is,
489       as it only knows the unicode character codes. If rxvt-unicode first
490       sees a japanese/chinese character, it might choose a japanese font for
491       display. Subsequent japanese characters will use that font. Now, many
492       chinese characters aren't represented in japanese fonts, so when the
493       first non-japanese character comes up, rxvt-unicode will look for a
494       chinese font -- unfortunately at this point, it will still use the
495       japanese font for chinese characters that are also in the japanese
496       font.
497
498       The workaround is easy: just tag a chinese font at the end of your font
499       list (see the previous question). The key is to view the font list as a
500       preference list: If you expect more japanese, list a japanese font
501       first. If you expect more chinese, put a chinese font first.
502
503       In the future it might be possible to switch language preferences at
504       runtime (the internal data structure has no problem with using
505       different fonts for the same character at the same time, but no
506       interface for this has been designed yet).
507
508       Until then, you might get away with switching fonts at runtime (see
509       "Can I switch the fonts at runtime?" later in this document).
510
511       How can I make mplayer display video correctly?
512
513       We are working on it, in the meantime, as a workaround, use something
514       like:
515
516          urxvt -b 600 -geometry 20x1 -e sh -c 'mplayer -wid $WINDOWID file...'
517
518       Why is the cursor now blinking in emacs/vi/...?
519
520       This is likely caused by your editor/program's use of the "cvvis"
521       terminfo capability. Emacs uses it by default, as well as some versions
522       of vi and possibly other programs.
523
524       In emacs, you can switch that off by adding this to your ".emacs" file:
525
526          (setq visible-cursor nil)
527
528       For other programs, if they do not have an option, your have to remove
529       the "cvvis" capability from the terminfo description.
530
531       When urxvt first added the blinking cursor option, it didn't add a
532       "cvvis" capability, which served no purpose before. Version 9.21
533       introduced "cvvis" (and the ability to control blinking independent of
534       cursor shape) for compatibility with other terminals, which
535       traditionally use a blinking cursor for "cvvis". This also reflects the
536       intent of programs such as emacs, who expect "cvvis" to enable a
537       blinking cursor.
538
539   Keyboard, Mouse & User Interaction
540       The new selection selects pieces that are too big, how can I select
541       single words?
542
543       If you want to select e.g. alphanumeric words, you can use the
544       following setting:
545
546          URxvt.selection.pattern-0: ([[:word:]]+)
547
548       If you click more than twice, the selection will be extended more and
549       more.
550
551       To get a selection that is very similar to the old code, try this
552       pattern:
553
554          URxvt.selection.pattern-0: ([^"&'()*,;<=>?@[\\\\]^`{|})]+)
555
556       Please also note that the LeftClick Shift-LeftClick combination also
557       selects words like the old code.
558
559       I don't like the new selection/popups/hotkeys/perl, how do I
560       change/disable it?
561
562       You can disable the perl extension completely by setting the perl-ext-
563       common resource to the empty string, which also keeps rxvt-unicode from
564       initialising perl, saving memory.
565
566       If you only want to disable specific features, you first have to
567       identify which perl extension is responsible. For this, read the
568       section PREPACKAGED EXTENSIONS in the urxvtperl(3) manpage. For
569       example, to disable the selection-popup and option-popup, specify this
570       perl-ext-common resource:
571
572          URxvt.perl-ext-common: default,-selection-popup,-option-popup
573
574       This will keep the default extensions, but disable the two popup
575       extensions. Some extensions can also be configured, for example,
576       scrollback search mode is triggered by M-s. You can move it to any
577       other combination by adding a keysym resource that binds the desired
578       combination to the "start" action of "searchable-scrollback" and
579       another one that binds M-s to the "builtin:" action:
580
581          URxvt.keysym.CM-s: searchable-scrollback:start
582          URxvt.keysym.M-s: builtin:
583
584       The cursor moves when selecting text in the current input line, how do
585       I switch this off?
586
587       See next entry.
588
589       During rlogin/ssh/telnet/etc. sessions, clicking near the cursor
590       outputs strange escape sequences, how do I fix this?
591
592       These are caused by the "readline" perl extension. Under normal
593       circumstances, it will move your cursor around when you click into the
594       line that contains it. It tries hard not to do this at the wrong
595       moment, but when running a program that doesn't parse cursor movements
596       or in some cases during rlogin sessions, it fails to detect this
597       properly.
598
599       You can permanently switch this feature off by disabling the "readline"
600       extension:
601
602          URxvt.perl-ext-common: default,-readline
603
604       My numeric keypad acts weird and generates differing output?
605
606       Some Debian GNU/Linux users seem to have this problem, although no
607       specific details were reported so far. It is possible that this is
608       caused by the wrong "TERM" setting, although the details of whether and
609       how this can happen are unknown, as "TERM=rxvt" should offer a
610       compatible keymap. See the answer to the previous question, and please
611       report if that helped.
612
613       My Compose (Multi_key) key is no longer working.
614
615       The most common causes for this are that either your locale is not set
616       correctly, or you specified a preeditType that is not supported by your
617       input method. For example, if you specified OverTheSpot and your input
618       method (e.g. the default input method handling Compose keys) does not
619       support this (for instance because it is not visual), then rxvt-unicode
620       will continue without an input method.
621
622       In this case either do not specify a preeditType or specify more than
623       one pre-edit style, such as OverTheSpot,Root,None.
624
625       If it still doesn't work, then maybe your input method doesn't support
626       compose sequences - to fall back to the built-in one, make sure you
627       don't specify an input method via "-im" or "XMODIFIERS".
628
629       I cannot type "Ctrl-Shift-2" to get an ASCII NUL character due to ISO
630       14755
631
632       Either try "Ctrl-2" alone (it often is mapped to ASCII NUL even on
633       international keyboards) or simply use ISO 14755 support to your
634       advantage, typing <Ctrl-Shift-0> to get a ASCII NUL. This works for
635       other codes, too, such as "Ctrl-Shift-1-d" to type the default telnet
636       escape character and so on.
637
638       Mouse cut/paste suddenly no longer works.
639
640       Make sure that mouse reporting is actually turned off since killing
641       some editors prematurely may leave it active. I've heard that tcsh may
642       use mouse reporting unless it is otherwise specified. A quick check is
643       to see if cut/paste works when the Alt or Shift keys are pressed.
644
645       What's with the strange Backspace/Delete key behaviour?
646
647       Assuming that the physical Backspace key corresponds to the Backspace
648       keysym (not likely for Linux ... see the following question) there are
649       two standard values that can be used for Backspace: "^H" and "^?".
650
651       Historically, either value is correct, but rxvt-unicode adopts the
652       debian policy of using "^?" when unsure, because it's the one and only
653       correct choice :).
654
655       It is possible to toggle between "^H" and "^?" with the DECBKM private
656       mode:
657
658          # use Backspace = ^H
659          $ stty erase ^H
660          $ printf "\e[?67h"
661
662          # use Backspace = ^?
663          $ stty erase ^?
664          $ printf "\e[?67l"
665
666       This helps satisfy some of the Backspace discrepancies that occur, but
667       if you use Backspace = "^H", make sure that the termcap/terminfo value
668       properly reflects that.
669
670       The Delete key is a another casualty of the ill-defined Backspace
671       problem.  To avoid confusion between the Backspace and Delete keys, the
672       Delete key has been assigned an escape sequence to match the vt100 for
673       Execute ("ESC [ 3 ~") and is in the supplied termcap/terminfo.
674
675       Some other Backspace problems:
676
677       some editors use termcap/terminfo, some editors (vim I'm told) expect
678       Backspace = ^H, GNU Emacs (and Emacs-like editors) use ^H for help.
679
680       Perhaps someday this will all be resolved in a consistent manner.
681
682       I don't like the key-bindings.  How do I change them?
683
684       There are some compile-time selections available via configure. Unless
685       you have run "configure" with the "--disable-resources" option you can
686       use the `keysym' resource to alter the keystrings associated with
687       keysyms.
688
689       Here's an example for a URxvt session started using "urxvt -name URxvt"
690
691          URxvt.keysym.Prior:         \033[5~
692          URxvt.keysym.Next:          \033[6~
693          URxvt.keysym.Home:          \033[7~
694          URxvt.keysym.End:           \033[8~
695          URxvt.keysym.Up:            \033[A
696          URxvt.keysym.Down:          \033[B
697          URxvt.keysym.Right:         \033[C
698          URxvt.keysym.Left:          \033[D
699
700       See some more examples in the documentation for the keysym resource.
701
702       I'm using keyboard model XXX that has extra Prior/Next/Insert keys. How
703       do I make use of them? For example, the Sun Keyboard type 4 has the
704       following map
705
706          KP_Insert == Insert
707          F22 == Print
708          F27 == Home
709          F29 == Prior
710          F33 == End
711          F35 == Next
712
713       Rather than have rxvt-unicode try to accommodate all the various
714       possible keyboard mappings, it is better to use `xmodmap' to remap the
715       keys as required for your particular machine.
716
717   Terminal Configuration
718       Can I see a typical configuration?
719
720       The default configuration tries to be xterm-like, which I don't like
721       that much, but it's least surprise to regular users.
722
723       As a rxvt or rxvt-unicode user, you are practically supposed to invest
724       time into customising your terminal. To get you started, here is the
725       author's .Xdefaults entries, with comments on what they do. It's
726       certainly not typical, but what's typical...
727
728          URxvt.cutchars: "()*,<>[]{}|'
729          URxvt.print-pipe: cat >/some/path
730
731       These are just for testing stuff.
732
733          URxvt.imLocale: ja_JP.UTF-8
734          URxvt.preeditType: OnTheSpot,None
735
736       This tells rxvt-unicode to use a special locale when communicating with
737       the X Input Method, and also tells it to only use the OnTheSpot pre-
738       edit type, which requires the "xim-onthespot" perl extension but
739       rewards me with correct-looking fonts.
740
741          URxvt.perl-lib: /root/lib/urxvt
742          URxvt.perl-ext-common: default,selection-autotransform,selection-pastebin,xim-onthespot,remote-clipboard
743          URxvt.selection.pattern-0: ( at .*? line \\d+)
744          URxvt.selection.pattern-1: ^(/[^:]+):\
745          URxvt.selection-autotransform.0: s/^([^:[:space:]]+):(\\d+):?$/:e \\Q$1\\E\\x0d:$2\\x0d/
746          URxvt.selection-autotransform.1: s/^ at (.*?) line (\\d+)$/:e \\Q$1\\E\\x0d:$2\\x0d/
747
748       This is my perl configuration. The first two set the perl library
749       directory and also tells urxvt to use a large number of extensions. I
750       develop for myself mostly, so I actually use most of the extensions I
751       write.
752
753       The selection stuff mainly makes the selection perl-error-message aware
754       and tells it to convert perl error messages into vi-commands to load
755       the relevant file and go to the error line number.
756
757          URxvt.scrollstyle:      plain
758          URxvt.secondaryScroll:  true
759
760       As the documentation says: plain is the preferred scrollbar for the
761       author. The "secondaryScroll" configures urxvt to scroll in full-screen
762       apps, like screen, so lines scrolled out of screen end up in urxvt's
763       scrollback buffer.
764
765          URxvt.background:       #000000
766          URxvt.foreground:       gray90
767          URxvt.color7:           gray90
768          URxvt.colorBD:          #ffffff
769          URxvt.cursorColor:      #e0e080
770          URxvt.throughColor:     #8080f0
771          URxvt.highlightColor:   #f0f0f0
772
773       Some colours. Not sure which ones are being used or even non-defaults,
774       but these are in my .Xdefaults. Most notably, they set
775       foreground/background to light gray/black, and also make sure that the
776       colour 7 matches the default foreground colour.
777
778          URxvt.underlineColor:   yellow
779
780       Another colour, makes underline lines look different. Sometimes hurts,
781       but is mostly a nice effect.
782
783          URxvt.geometry:         154x36
784          URxvt.loginShell:       false
785          URxvt.meta:             ignore
786          URxvt.utmpInhibit:      true
787
788       Uh, well, should be mostly self-explanatory. By specifying some
789       defaults manually, I can quickly switch them for testing.
790
791          URxvt.saveLines:        8192
792
793       A large scrollback buffer is essential. Really.
794
795          URxvt.mapAlert:         true
796
797       The only case I use it is for my IRC window, which I like to keep
798       iconified till people msg me (which beeps).
799
800          URxvt.visualBell:       true
801
802       The audible bell is often annoying, especially when in a crowd.
803
804          URxvt.insecure:         true
805
806       Please don't hack my mutt! Ooops...
807
808          URxvt.pastableTabs:     false
809
810       I once thought this is a great idea.
811
812          urxvt.font:             9x15bold,\
813                                  -misc-fixed-bold-r-normal--15-140-75-75-c-90-iso10646-1,\
814                                  -misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1, \
815                                  [codeset=JISX0208]xft:Kochi Gothic, \
816                                  xft:Bitstream Vera Sans Mono:autohint=true, \
817                                  xft:Code2000:antialias=false
818          urxvt.boldFont:         -xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso8859-15
819          urxvt.italicFont:       xft:Bitstream Vera Sans Mono:italic:autohint=true
820          urxvt.boldItalicFont:   xft:Bitstream Vera Sans Mono:bold:italic:autohint=true
821
822       I wrote rxvt-unicode to be able to specify fonts exactly. So don't be
823       overwhelmed. A special note: the "9x15bold" mentioned above is actually
824       the version from XFree-3.3, as XFree-4 replaced it by a totally
825       different font (different glyphs for ";" and many other harmless
826       characters), while the second font is actually the "9x15bold" from
827       XFree4/XOrg. The bold version has less chars than the medium version,
828       so I use it for rare characters, too. When editing sources with vim, I
829       use italic for comments and other stuff, which looks quite good with
830       Bitstream Vera anti-aliased.
831
832       Terminus is a quite bad font (many very wrong glyphs), but for most of
833       my purposes, it works, and gives a different look, as my normal (Non-
834       bold) font is already bold, and I want to see a difference between bold
835       and normal fonts.
836
837       Please note that I used the "urxvt" instance name and not the "URxvt"
838       class name. That is because I use different configs for different
839       purposes, for example, my IRC window is started with "-name IRC", and
840       uses these defaults:
841
842          IRC*title:              IRC
843          IRC*geometry:           87x12+535+542
844          IRC*saveLines:          0
845          IRC*mapAlert:           true
846          IRC*font:               suxuseuro
847          IRC*boldFont:           suxuseuro
848          IRC*colorBD:            white
849          IRC*keysym.M-C-1:       command:\033]710;suxuseuro\007\033]711;suxuseuro\007
850          IRC*keysym.M-C-2:       command:\033]710;9x15bold\007\033]711;9x15bold\007
851
852       "Alt-Ctrl-1" and "Alt-Ctrl-2" switch between two different font sizes.
853       "suxuseuro" allows me to keep an eye (and actually read) stuff while
854       keeping a very small window. If somebody pastes something complicated
855       (e.g. japanese), I temporarily switch to a larger font.
856
857       The above is all in my ".Xdefaults" (I don't use ".Xresources" nor
858       "xrdb"). I also have some resources in a separate ".Xdefaults-hostname"
859       file for different hosts, for example, on my main desktop, I use:
860
861          URxvt.keysym.C-M-q: command:\033[3;5;5t
862          URxvt.keysym.C-M-y: command:\033[3;5;606t
863          URxvt.keysym.C-M-e: command:\033[3;1605;5t
864          URxvt.keysym.C-M-c: command:\033[3;1605;606t
865          URxvt.keysym.C-M-p: perl:test
866
867       The first for keysym definitions allow me to quickly bring some windows
868       in the layout I like most. Ion users might start laughing but will stop
869       immediately when I tell them that I use my own Fvwm2 module for much
870       the same effect as Ion provides, and I only very rarely use the above
871       key combinations :->
872
873       Why doesn't rxvt-unicode read my resources?
874
875       Well, why, indeed? It does, in a way very similar to other X
876       applications. Most importantly, this means that if you or your OS loads
877       resources into the X display (the right way to do it), rxvt-unicode
878       will ignore any resource files in your home directory. It will only
879       read $HOME/.Xdefaults when no resources are attached to the display.
880
881       If you have or use an $HOME/.Xresources file, chances are that
882       resources are loaded into your X-server. In this case, you have to re-
883       login after every change (or run xrdb -merge $HOME/.Xresources).
884
885       Also consider the form resources have to use:
886
887         URxvt.resource: value
888
889       If you want to use another form (there are lots of different ways of
890       specifying resources), make sure you understand whether and why it
891       works. If unsure, use the form above.
892
893       When I log-in to another system it tells me about missing terminfo
894       data?
895
896       The terminal description used by rxvt-unicode is not as widely
897       available as that for xterm, or even rxvt (for which the same problem
898       often arises).
899
900       The correct solution for this problem is to install the terminfo, this
901       can be done by simply installing rxvt-unicode on the remote system as
902       well (in case you have a nice package manager ready), or you can
903       install the terminfo database manually like this (with ncurses infocmp.
904       works as user and root):
905
906          REMOTE=remotesystem.domain
907          infocmp rxvt-unicode | ssh $REMOTE "mkdir -p .terminfo && cat >/tmp/ti && tic /tmp/ti"
908
909       One some systems you might need to set $TERMINFO to the full path of
910       $HOME/.terminfo for this to work.
911
912       If you cannot or do not want to do this, then you can simply set
913       "TERM=rxvt" or even "TERM=xterm", and live with the small number of
914       problems arising, which includes wrong keymapping, less and different
915       colours and some refresh errors in fullscreen applications. It's a nice
916       quick-and-dirty workaround for rare cases, though.
917
918       If you always want to do this (and are fine with the consequences) you
919       can either recompile rxvt-unicode with the desired TERM value or use a
920       resource to set it:
921
922          URxvt.termName: rxvt
923
924       If you don't plan to use rxvt (quite common...) you could also replace
925       the rxvt terminfo file with the rxvt-unicode one and use "TERM=rxvt".
926
927       nano fails with "Error opening terminal: rxvt-unicode"
928
929       This exceptionally confusing and useless error message is printed by
930       nano when it can't find the terminfo database. Nothing is wrong with
931       your terminal, read the previous answer for a solution.
932
933       "tic" outputs some error when compiling the terminfo entry.
934
935       Most likely it's the empty definition for "enacs=". Just replace it by
936       "enacs=\E[0@" and try again.
937
938       "bash"'s readline does not work correctly under urxvt.
939
940       See next entry.
941
942       I need a termcap file entry.
943
944       One reason you might want this is that some distributions or operating
945       systems still compile some programs using the long-obsoleted termcap
946       library (Fedora's bash is one example) and rely on a termcap entry for
947       "rxvt-unicode".
948
949       You could use rxvt's termcap entry with reasonable results in many
950       cases.  You can also create a termcap entry by using terminfo's infocmp
951       program like this:
952
953          infocmp -C rxvt-unicode
954
955       Or you could use the termcap entry in doc/etc/rxvt-unicode.termcap,
956       generated by the command above.
957
958       Why does "ls" no longer have coloured output?
959
960       The "ls" in the GNU coreutils unfortunately doesn't use terminfo to
961       decide whether a terminal has colour, but uses its own configuration
962       file. Needless to say, "rxvt-unicode" is not in its default file (among
963       with most other terminals supporting colour). Either add:
964
965          TERM rxvt-unicode
966
967       to "/etc/DIR_COLORS" or simply add:
968
969          alias ls='ls --color=auto'
970
971       to your ".profile" or ".bashrc".
972
973       Why doesn't vim/emacs etc. use the 88 colour mode?
974
975       See next entry.
976
977       Why doesn't vim/emacs etc. make use of italic?
978
979       See next entry.
980
981       Why are the secondary screen-related options not working properly?
982
983       Make sure you are using "TERM=rxvt-unicode". Some pre-packaged
984       distributions break rxvt-unicode by setting "TERM" to "rxvt", which
985       doesn't have these extra features. Unfortunately, some of these
986       furthermore fail to even install the "rxvt-unicode" terminfo file, so
987       you will need to install it on your own (See the question When I log-in
988       to another system it tells me about missing terminfo data? on how to do
989       this).
990
991   Encoding / Locale / Input Method Issues
992       Rxvt-unicode does not seem to understand the selected encoding?
993
994       See next entry.
995
996       Unicode does not seem to work?
997
998       If you encounter strange problems like typing an accented character but
999       getting two unrelated other characters or similar, or if program output
1000       is subtly garbled, then you should check your locale settings.
1001
1002       Rxvt-unicode must be started with the same "LC_CTYPE" setting as the
1003       programs running in it. Often rxvt-unicode is started in the "C"
1004       locale, while the login script running within the rxvt-unicode window
1005       changes the locale to something else, e.g. "en_GB.UTF-8". Needless to
1006       say, this is not going to work, and is the most common cause for
1007       problems.
1008
1009       The best thing is to fix your startup environment, as you will likely
1010       run into other problems. If nothing works you can try this in your
1011       .profile.
1012
1013         printf '\33]701;%s\007' "$LC_CTYPE"   # $LANG or $LC_ALL are worth a try, too
1014
1015       If this doesn't work, then maybe you use a "LC_CTYPE" specification not
1016       supported on your systems. Some systems have a "locale" command which
1017       displays this (also, "perl -e0" can be used to check locale settings,
1018       as it will complain loudly if it cannot set the locale). If it displays
1019       something like:
1020
1021         locale: Cannot set LC_CTYPE to default locale: ...
1022
1023       Then the locale you specified is not supported on your system.
1024
1025       If nothing works and you are sure that everything is set correctly then
1026       you will need to remember a little known fact: Some programs just don't
1027       support locales :(
1028
1029       How does rxvt-unicode determine the encoding to use?
1030
1031       See next entry.
1032
1033       Is there an option to switch encodings?
1034
1035       Unlike some other terminals, rxvt-unicode has no encoding switch, and
1036       no specific "utf-8" mode, such as xterm. In fact, it doesn't even know
1037       about UTF-8 or any other encodings with respect to terminal I/O.
1038
1039       The reasons is that there exists a perfectly fine mechanism for
1040       selecting the encoding, doing I/O and (most important) communicating
1041       this to all applications so everybody agrees on character properties
1042       such as width and code number. This mechanism is the locale.
1043       Applications not using that info will have problems (for example,
1044       "xterm" gets the width of characters wrong as it uses its own, locale-
1045       independent table under all locales).
1046
1047       Rxvt-unicode uses the "LC_CTYPE" locale category to select encoding.
1048       All programs doing the same (that is, most) will automatically agree in
1049       the interpretation of characters.
1050
1051       Unfortunately, there is no system-independent way to select locales,
1052       nor is there a standard on how locale specifiers will look like.
1053
1054       On most systems, the content of the "LC_CTYPE" environment variable
1055       contains an arbitrary string which corresponds to an already-installed
1056       locale. Common names for locales are "en_US.UTF-8",
1057       "de_DE.ISO-8859-15", "ja_JP.EUC-JP", i.e. "language_country.encoding",
1058       but other forms (i.e. "de" or "german") are also common.
1059
1060       Rxvt-unicode ignores all other locale categories, and except for the
1061       encoding, ignores country or language-specific settings, i.e.
1062       "de_DE.UTF-8" and "ja_JP.UTF-8" are the normally same to rxvt-unicode.
1063
1064       If you want to use a specific encoding you have to make sure you start
1065       rxvt-unicode with the correct "LC_CTYPE" category.
1066
1067       Can I switch locales at runtime?
1068
1069       Yes, using an escape sequence. Try something like this, which sets
1070       rxvt-unicode's idea of "LC_CTYPE".
1071
1072         printf '\33]701;%s\007' ja_JP.SJIS
1073
1074       See also the previous answer.
1075
1076       Sometimes this capability is rather handy when you want to work in one
1077       locale (e.g. "de_DE.UTF-8") but some programs don't support it (e.g.
1078       UTF-8). For example, I use this script to start "xjdic", which first
1079       switches to a locale supported by xjdic and back later:
1080
1081          printf '\33]701;%s\007' ja_JP.SJIS
1082          xjdic -js
1083          printf '\33]701;%s\007' de_DE.UTF-8
1084
1085       You can also use xterm's "luit" program, which usually works fine,
1086       except for some locales where character width differs between program-
1087       and rxvt-unicode-locales.
1088
1089       I have problems getting my input method working.
1090
1091       Try a search engine, as this is slightly different for every input
1092       method server.
1093
1094       Here is a checklist:
1095
1096       - Make sure your locale and the imLocale are supported on your OS.
1097           Try "locale -a" or check the documentation for your OS.
1098
1099       - Make sure your locale or imLocale matches a locale supported by your
1100       XIM.
1101           For example, kinput2 does not support UTF-8 locales, you should use
1102           "ja_JP.EUC-JP" or equivalent.
1103
1104       - Make sure your XIM server is actually running.
1105       - Make sure the "XMODIFIERS" environment variable is set correctly when
1106       starting rxvt-unicode.
1107           When you want to use e.g. kinput2, it must be set to "@im=kinput2".
1108           For scim, use "@im=SCIM". You can see what input method servers are
1109           running with this command:
1110
1111              xprop -root XIM_SERVERS
1112
1113       My input method wants <some encoding> but I want UTF-8, what can I do?
1114
1115       You can specify separate locales for the input method and the rest of
1116       the terminal, using the resource "imlocale":
1117
1118          URxvt.imlocale: ja_JP.EUC-JP
1119
1120       Now you can start your terminal with "LC_CTYPE=ja_JP.UTF-8" and still
1121       use your input method. Please note, however, that, depending on your
1122       Xlib version, you may not be able to input characters outside "EUC-JP"
1123       in a normal way then, as your input method limits you.
1124
1125       Rxvt-unicode crashes when the X Input Method changes or exits.
1126
1127       Unfortunately, this is unavoidable, as the XIM protocol is racy by
1128       design. Applications can avoid some crashes at the expense of memory
1129       leaks, and Input Methods can avoid some crashes by careful ordering at
1130       exit time. kinput2 (and derived input methods) generally succeeds,
1131       while SCIM (or similar input methods) fails. In the end, however,
1132       crashes cannot be completely avoided even if both sides cooperate.
1133
1134       So the only workaround is not to kill your Input Method Servers.
1135
1136   Operating Systems / Package Maintaining
1137       I am maintaining rxvt-unicode for distribution/OS XXX, any
1138       recommendation?
1139
1140       You should build one binary with the default options. configure now
1141       enables most useful options, and the trend goes to making them runtime-
1142       switchable, too, so there is usually no drawback to enabling them,
1143       except higher disk and possibly memory usage. The perl interpreter
1144       should be enabled, as important functionality (menus, selection, likely
1145       more in the future) depends on it.
1146
1147       You should not overwrite the "perl-ext-common" and "perl-ext" resources
1148       system-wide (except maybe with "defaults"). This will result in useful
1149       behaviour. If your distribution aims at low memory, add an empty
1150       "perl-ext-common" resource to the app-defaults file. This will keep the
1151       perl interpreter disabled until the user enables it.
1152
1153       If you can/want build more binaries, I recommend building a minimal one
1154       with "--disable-everything" (very useful) and a maximal one with
1155       "--enable-everything" (less useful, it will be very big due to a lot of
1156       encodings built-in that increase download times and are rarely used).
1157
1158       I need to make it setuid/setgid to support utmp/ptys on my OS, is this
1159       safe?
1160
1161       It should be, starting with release 7.1. You are encouraged to properly
1162       install urxvt with privileges necessary for your OS now.
1163
1164       When rxvt-unicode detects that it runs setuid or setgid, it will fork
1165       into a helper process for privileged operations (pty handling on some
1166       systems, utmp/wtmp/lastlog handling on others) and drop privileges
1167       immediately. This is much safer than most other terminals that keep
1168       privileges while running (but is more relevant to urxvt, as it contains
1169       things as perl interpreters, which might be "helpful" to attackers).
1170
1171       This forking is done as the very first within main(), which is very
1172       early and reduces possible bugs to initialisation code run before
1173       main(), or things like the dynamic loader of your system, which should
1174       result in very little risk.
1175
1176       I am on FreeBSD and rxvt-unicode does not seem to work at all.
1177
1178       Rxvt-unicode requires the symbol "__STDC_ISO_10646__" to be defined in
1179       your compile environment, or an implementation that implements it,
1180       whether it defines the symbol or not. "__STDC_ISO_10646__" requires
1181       that wchar_t is represented as unicode.
1182
1183       As you might have guessed, FreeBSD does neither define this symbol nor
1184       does it support it. Instead, it uses its own internal representation of
1185       wchar_t. This is, of course, completely fine with respect to standards.
1186
1187       However, that means rxvt-unicode only works in "POSIX", "ISO-8859-1"
1188       and "UTF-8" locales under FreeBSD (which all use Unicode as wchar_t).
1189
1190       "__STDC_ISO_10646__" is the only sane way to support multi-language
1191       apps in an OS, as using a locale-dependent (and non-standardized)
1192       representation of wchar_t makes it impossible to convert between
1193       wchar_t (as used by X11 and your applications) and any other encoding
1194       without implementing OS-specific-wrappers for each and every locale.
1195       There simply are no APIs to convert wchar_t into anything except the
1196       current locale encoding.
1197
1198       Some applications (such as the formidable mlterm) work around this by
1199       carrying their own replacement functions for character set handling
1200       with them, and either implementing OS-dependent hacks or doing multiple
1201       conversions (which is slow and unreliable in case the OS implements
1202       encodings slightly different than the terminal emulator).
1203
1204       The rxvt-unicode author insists that the right way to fix this is in
1205       the system libraries once and for all, instead of forcing every app to
1206       carry complete replacements for them :)
1207
1208       How can I use rxvt-unicode under cygwin?
1209
1210       rxvt-unicode should compile and run out of the box on cygwin, using the
1211       X11 libraries that come with cygwin. libW11 emulation is no longer
1212       supported (and makes no sense, either, as it only supported a single
1213       font). I recommend starting the X-server in "-multiwindow" or
1214       "-rootless" mode instead, which will result in similar look&feel as the
1215       old libW11 emulation.
1216
1217       At the time of this writing, cygwin didn't seem to support any multi-
1218       byte encodings (you might try "LC_CTYPE=C-UTF-8"), so you are likely
1219       limited to 8-bit encodings.
1220
1221       Character widths are not correct.
1222
1223       urxvt uses the system wcwidth function to know the information about
1224       the width of characters, so on systems with incorrect locale data you
1225       will likely get bad results. Two notorious examples are Solaris 9,
1226       where single-width characters like U+2514 are reported as double-width,
1227       and Darwin 8, where combining chars are reported having width 1.
1228
1229       The solution is to upgrade your system or switch to a better one. A
1230       possibly working workaround is to use a wcwidth implementation like
1231
1232       http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
1233

RXVT-UNICODE TECHNICAL REFERENCE

1235       The rest of this document describes various technical aspects of rxvt-
1236       unicode. First the description of supported command sequences, followed
1237       by pixmap support and last by a description of all features selectable
1238       at "configure" time.
1239
1240       When some functionality is marked as (insecure mode), then it requires
1241       insecure mode to be enabled to work fully, e.g. by using the insecure
1242       resource or command line switch. As that name implies, a terminal
1243       running in insecure mode might not be secure against attackers that can
1244       output arbitrary sequences to the terminal.
1245
1246   Definitions
1247       "c" The literal character c (potentially a multi-byte character).
1248
1249       "C" A single (required) character.
1250
1251       "Ps"
1252           A single (usually optional) numeric parameter, composed of one or
1253           more digits.
1254
1255       "Pm"
1256           A multiple numeric parameter composed of any number of single
1257           numeric parameters, separated by ";" character(s).
1258
1259       "Pt"
1260           A text parameter composed of printable characters.
1261
1262   Values
1263       "ENQ"
1264           Enquiry (Ctrl-E) = Send Device Attributes (DA) request attributes
1265           from terminal. See "ESC [ Ps c".
1266
1267       "BEL"
1268           Bell (Ctrl-G)
1269
1270       "BS"
1271           Backspace (Ctrl-H)
1272
1273       "TAB"
1274           Horizontal Tab (HT) (Ctrl-I)
1275
1276       "LF"
1277           Line Feed or New Line (NL) (Ctrl-J)
1278
1279       "VT"
1280           Vertical Tab (Ctrl-K) same as "LF"
1281
1282       "FF"
1283           Form Feed or New Page (NP) (Ctrl-L) same as "LF"
1284
1285       "CR"
1286           Carriage Return (Ctrl-M)
1287
1288       "SO"
1289           Shift Out (Ctrl-N), invokes the G1 character set.  Switch to
1290           Alternate Character Set
1291
1292       "SI"
1293           Shift In (Ctrl-O), invokes the G0 character set (the default).
1294           Switch to Standard Character Set
1295
1296       "SP"
1297           Space Character
1298
1299   Escape Sequences
1300       "ESC # 8"
1301           DEC Screen Alignment Test (DECALN)
1302
1303       "ESC 7"
1304           Save Cursor (SC)
1305
1306       "ESC 8"
1307           Restore Cursor
1308
1309       "ESC ="
1310           Application Keypad (SMKX). See also next sequence.
1311
1312       "ESC >"
1313           Normal Keypad (RMKX)
1314
1315           Note: numbers or control functions are generated by the numeric
1316           keypad in normal or application mode, respectively (see Key Codes).
1317
1318       "ESC D"
1319           Index (IND)
1320
1321       "ESC E"
1322           Next Line (NEL)
1323
1324       "ESC H"
1325           Tab Set (HTS)
1326
1327       "ESC M"
1328           Reverse Index (RI)
1329
1330       "ESC N"
1331           Single Shift Select of G2 Character Set (SS2): affects next
1332           character only unimplemented
1333
1334       "ESC O"
1335           Single Shift Select of G3 Character Set (SS3): affects next
1336           character only unimplemented
1337
1338       "ESC Z"
1339           Obsolete form of returns: "ESC [ ? 1 ; 2 C" rxvt-unicode compile-
1340           time option
1341
1342       "ESC c"
1343           Full reset (RIS)
1344
1345       "ESC n"
1346           Invoke the G2 Character Set (LS2)
1347
1348       "ESC o"
1349           Invoke the G3 Character Set (LS3)
1350
1351       "ESC ( C"
1352           Designate G0 Character Set (ISO 2022), see below for values of "C".
1353
1354       "ESC ) C"
1355           Designate G1 Character Set (ISO 2022), see below for values of "C".
1356
1357       "ESC * C"
1358           Designate G2 Character Set (ISO 2022), see below for values of "C".
1359
1360       "ESC + C"
1361           Designate G3 Character Set (ISO 2022), see below for values of "C".
1362
1363       "ESC $ C"
1364           Designate Kanji Character Set
1365
1366           Where "C" is one of:
1367
1368           C = 0   DEC Special Character and Line Drawing Set
1369           C = A   United Kingdom (UK)
1370           C = B   United States (USASCII)
1371           C = <   Multinational character set unimplemented
1372           C = 5   Finnish character set unimplemented
1373           C = C   Finnish character set unimplemented
1374           C = K   German character set unimplemented
1375
1376   CSI (Command Sequence Introducer) Sequences
1377       "ESC [ Ps @"
1378           Insert "Ps" (Blank) Character(s) [default: 1] (ICH)
1379
1380       "ESC [ Ps A"
1381           Cursor Up "Ps" Times [default: 1] (CUU)
1382
1383       "ESC [ Ps B"
1384           Cursor Down "Ps" Times [default: 1] (CUD)
1385
1386       "ESC [ Ps C"
1387           Cursor Forward "Ps" Times [default: 1] (CUF)
1388
1389       "ESC [ Ps D"
1390           Cursor Backward "Ps" Times [default: 1] (CUB)
1391
1392       "ESC [ Ps E"
1393           Cursor Down "Ps" Times [default: 1] and to first column
1394
1395       "ESC [ Ps F"
1396           Cursor Up "Ps" Times [default: 1] and to first column
1397
1398       "ESC [ Ps G"
1399           Cursor to Column "Ps" (HPA)
1400
1401       "ESC [ Ps;Ps H"
1402           Cursor Position [row;column] [default: 1;1] (CUP)
1403
1404       "ESC [ Ps I"
1405           Move forward "Ps" tab stops [default: 1]
1406
1407       "ESC [ Ps J"
1408           Erase in Display (ED)
1409
1410           Ps = 0   Clear Right and Below (default)
1411           Ps = 1   Clear Left and Above
1412           Ps = 2   Clear All
1413
1414       "ESC [ Ps K"
1415           Erase in Line (EL)
1416
1417           Ps = 0   Clear to Right (default)
1418           Ps = 1   Clear to Left
1419           Ps = 2   Clear All
1420           Ps = 3   Like Ps = 0, but is ignored when wrapped
1421                                                                   (urxvt extension)
1422
1423       "ESC [ Ps L"
1424           Insert "Ps" Line(s) [default: 1] (IL)
1425
1426       "ESC [ Ps M"
1427           Delete "Ps" Line(s) [default: 1] (DL)
1428
1429       "ESC [ Ps P"
1430           Delete "Ps" Character(s) [default: 1] (DCH)
1431
1432       "ESC [ Ps;Ps;Ps;Ps;Ps T"
1433           Initiate . unimplemented Parameters are
1434           [func;startx;starty;firstrow;lastrow].
1435
1436       "ESC [ Ps W"
1437           Tabulator functions
1438
1439           Ps = 0   Tab Set (HTS)
1440           Ps = 2   Tab Clear (TBC), Clear Current Column (default)
1441           Ps = 5   Tab Clear (TBC), Clear All
1442
1443       "ESC [ Ps X"
1444           Erase "Ps" Character(s) [default: 1] (ECH)
1445
1446       "ESC [ Ps Z"
1447           Move backward "Ps" [default: 1] tab stops
1448
1449       "ESC [ Ps '"
1450           See "ESC [ Ps G"
1451
1452       "ESC [ Ps a"
1453           See "ESC [ Ps C"
1454
1455       "ESC [ Ps c"
1456           Send Device Attributes (DA) "Ps = 0" (or omitted): request
1457           attributes from terminal returns: "ESC [ ? 1 ; 2 c" (``I am a VT100
1458           with Advanced Video Option'')
1459
1460       "ESC [ Ps d"
1461           Cursor to Line "Ps" (VPA)
1462
1463       "ESC [ Ps e"
1464           See "ESC [ Ps A"
1465
1466       "ESC [ Ps;Ps f"
1467           Horizontal and Vertical Position [row;column] (HVP) [default: 1;1]
1468
1469       "ESC [ Ps g"
1470           Tab Clear (TBC)
1471
1472           Ps = 0   Clear Current Column (default)
1473           Ps = 3   Clear All (TBC)
1474
1475       "ESC [ Pm h"
1476           Set Mode (SM). See "ESC [ Pm l" sequence for description of "Pm".
1477
1478       "ESC [ Ps i"
1479           Printing. See also the "print-pipe" resource.
1480
1481           Ps = 0   print screen (MC0)
1482           Ps = 4   disable transparent print mode (MC4)
1483           Ps = 5   enable transparent print mode (MC5)
1484
1485       "ESC [ Pm l"
1486           Reset Mode (RM)
1487
1488           "Ps = 4"
1489
1490               h   Insert Mode (SMIR)
1491               l   Replace Mode (RMIR)
1492           "Ps = 20" (partially implemented)
1493               h   Automatic Newline (LNM)
1494               l   Normal Linefeed (LNM)
1495       "ESC [ Pm m"
1496           Character Attributes (SGR)
1497
1498           Pm = 0             Normal (default)
1499           Pm = 1 / 21        On / Off Bold (bright fg)
1500           Pm = 3 / 23        On / Off Italic
1501           Pm = 4 / 24        On / Off Underline
1502           Pm = 5 / 25        On / Off Slow Blink (bright bg)
1503           Pm = 6 / 26        On / Off Rapid Blink (bright bg)
1504           Pm = 7 / 27        On / Off Inverse
1505           Pm = 8 / 27        On / Off Invisible (NYI)
1506           Pm = 30 / 40       fg/bg Black
1507           Pm = 31 / 41       fg/bg Red
1508           Pm = 32 / 42       fg/bg Green
1509           Pm = 33 / 43       fg/bg Yellow
1510           Pm = 34 / 44       fg/bg Blue
1511
1512           Pm = 35 / 45       fg/bg Magenta
1513           Pm = 36 / 46       fg/bg Cyan
1514           Pm = 37 / 47       fg/bg White
1515           Pm = 38;5 / 48;5   set fg/bg to colour #m (ISO 8613-6)
1516           Pm = 38;2;R;G;B    set fg to 24-bit colour #RGB (ISO 8613-3)
1517           Pm = 48;2;R;G;B    set bg to 24-bit colour #RGB (ISO 8613-3)
1518           Pm = 39 / 49       fg/bg Default
1519           Pm = 90 / 100      fg/bg Bright Black
1520           Pm = 91 / 101      fg/bg Bright Red
1521           Pm = 92 / 102      fg/bg Bright Green
1522           Pm = 93 / 103      fg/bg Bright Yellow
1523           Pm = 94 / 104      fg/bg Bright Blue
1524           Pm = 95 / 105      fg/bg Bright Magenta
1525           Pm = 96 / 106      fg/bg Bright Cyan
1526           Pm = 97 / 107      fg/bg Bright White
1527           Pm = 99 / 109      fg/bg Bright Default
1528
1529       "ESC [ Ps n"
1530           Device Status Report (DSR)
1531
1532           Ps = 5   Status Report ESC [ 0 n (``OK'')
1533           Ps = 6   Report Cursor Position (CPR) [row;column] as ESC [ r ; c R
1534           Ps = 7   Request Display Name (insecure mode)
1535           Ps = 8   Request Version Number (place in window title)
1536
1537       "ESC [ Ps SP q"
1538           Set Cursor Style (DECSCUSR)
1539
1540           Ps = 0   Blink Block
1541           Ps = 1   Blink Block
1542           Ps = 2   Steady Block
1543           Ps = 3   Blink Underline
1544           Ps = 4   Steady Underline
1545           Ps = 5   Blink Bar (XTerm)
1546           Ps = 6   Steady Bar (XTerm)
1547
1548       "ESC [ Ps;Ps r"
1549           Set Scrolling Region [top;bottom] [default: full size of window]
1550           (CSR)
1551
1552       "ESC [ s"
1553           Save Cursor (SC)
1554
1555       "ESC [ Ps;Pt t"
1556           Window Operations
1557
1558           Ps = 1      Deiconify (map) window
1559           Ps = 2      Iconify window
1560           Ps = 3      ESC [ 3 ; X ; Y t Move window to (X|Y)
1561           Ps = 4      ESC [ 4 ; H ; W t Resize to WxH pixels
1562           Ps = 5      Raise window
1563           Ps = 6      Lower window
1564           Ps = 7      Refresh screen once
1565           Ps = 8      ESC [ 8 ; R ; C t Resize to R rows and C columns
1566           Ps = 11     Report window state (responds with Ps = 1 or Ps = 2)
1567           Ps = 13     Report window position (responds with Ps = 3)
1568           Ps = 14     Report window pixel size (responds with Ps = 4)
1569           Ps = 18     Report window text size (responds with Ps = 7)
1570           Ps = 19     Currently the same as Ps = 18, but responds with Ps = 9
1571           Ps = 20     Reports icon label (ESC ] L NAME 234) (insecure mode)
1572           Ps = 21     Reports window title (ESC ] l NAME 234) (insecure mode)
1573           Ps = 24..   Set window height to Ps rows
1574
1575       "ESC [ u"
1576           Restore Cursor
1577
1578       "ESC [ Ps x"
1579           Request Terminal Parameters (DECREQTPARM)
1580
1581   DEC Private Modes
1582       "ESC [ ? Pm h"
1583           DEC Private Mode Set (DECSET)
1584
1585       "ESC [ ? Pm l"
1586           DEC Private Mode Reset (DECRST)
1587
1588       "ESC [ ? Pm r"
1589           Restore previously saved DEC Private Mode Values.
1590
1591       "ESC [ ? Pm s"
1592           Save DEC Private Mode Values.
1593
1594       "ESC [ ? Pm t"
1595           Toggle DEC Private Mode Values (rxvt extension). where
1596
1597           "Pm = 1" (DECCKM)
1598
1599               h   Application Cursor Keys
1600               l   Normal Cursor Keys
1601           "Pm = 2" (DECANM)
1602               h   Enter VT52 mode
1603               l   Enter VT52 mode
1604           "Pm = 3" (DECCOLM)
1605               h   132 Column Mode
1606               l   80 Column Mode
1607           "Pm = 4" (DECSCLM)
1608               h   Smooth (Slow) Scroll
1609               l   Jump (Fast) Scroll
1610           "Pm = 5" (DECSCNM)
1611               h   Reverse Video
1612               l   Normal Video
1613           "Pm = 6" (DECOM)
1614               h   Origin Mode
1615               l   Normal Cursor Mode
1616           "Pm = 7" (DECAWM)
1617               h   Wraparound Mode
1618               l   No Wraparound Mode
1619           "Pm = 8" (DECARM) unimplemented
1620               h   Auto-repeat Keys
1621               l   No Auto-repeat Keys
1622           "Pm = 9" (X10 XTerm mouse protocol)
1623               h   Send Mouse X & Y on button press.
1624               l   No mouse reporting.
1625           "Pm = 12" (AT&T 610, XTerm)
1626               h   Blinking cursor (cvvis)
1627               l   Steady cursor (cnorm)
1628           "Pm = 25" (DECTCEM)
1629               h   Visible cursor {cnorm/cvvis}
1630               l   Invisible cursor {civis}
1631           "Pm = 30" (rxvt)
1632               h   scrollBar visible
1633               l   scrollBar invisible
1634           "Pm = 35" (rxvt)
1635               h   Allow XTerm Shift+key sequences
1636               l   Disallow XTerm Shift+key sequences
1637           "Pm = 38" unimplemented
1638               Enter Tektronix Mode (DECTEK)
1639
1640           "Pm = 40"
1641
1642               h   Allow 80/132 Mode
1643               l   Disallow 80/132 Mode
1644           "Pm = 44" unimplemented
1645               h   Turn On Margin Bell
1646               l   Turn Off Margin Bell
1647           "Pm = 45" unimplemented
1648               h   Reverse-wraparound Mode
1649               l   No Reverse-wraparound Mode
1650           "Pm = 46" unimplemented
1651           "Pm = 47"
1652               h   Use Alternate Screen Buffer
1653               l   Use Normal Screen Buffer
1654
1655
1656           "Pm = 66" (DECNKM)
1657
1658
1659               h   Application Keypad (DECKPAM/DECPAM) == ESC =
1660               l   Normal Keypad (DECKPNM/DECPNM) == ESC >
1661           "Pm = 67" (DECBKM)
1662               h   Backspace key sends BS
1663               l   Backspace key sends DEL
1664           "Pm = 1000" (X11 XTerm mouse protocol)
1665               h   Send Mouse X & Y on button press and release.
1666               l   No mouse reporting.
1667           "Pm = 1001" (X11 XTerm) unimplemented
1668               h   Use Hilite Mouse Tracking.
1669               l   No mouse reporting.
1670           "Pm = 1002" (X11 XTerm cell motion mouse tracking)
1671               h   Send Mouse X & Y on button press and release, and motion with a button pressed.
1672               l   No mouse reporting.
1673           "Pm = 1003" (X11 XTerm all motion mouse tracking)
1674               h   Send Mouse X & Y on button press and release, and motion.
1675               l   No mouse reporting.
1676           "Pm = 1004" (X11 XTerm focus in/focus out events)
1677               h   Send Mouse focus in/focus out events.
1678               l   Don't send focus events.
1679           "Pm = 1005" (X11 XTerm UTF-8 mouse mode) (Compile frills)
1680               Try to avoid this mode, it doesn't work sensibly in non-UTF-8
1681               locales. Use mode 1015 instead.
1682
1683               Unlike XTerm, coordinates larger than 2015 will work fine.
1684
1685               h   Enable mouse coordinates in locale-specific encoding.
1686               l   Disable mouse coordinates in locale-specific encoding.
1687
1688           "Pm = 1006" (X11 XTerm SGR mouse mode) (Compile frills)
1689
1690               h   Enable xterm SGR mouse coordinate reporting.
1691               l   Disable xterm SGR mouse coordinate reporting.
1692           "Pm = 1010" (rxvt)
1693               h   Don't scroll to bottom on TTY output
1694               l   Scroll to bottom on TTY output
1695           "Pm = 1011" (rxvt)
1696               h   Scroll to bottom when a key is pressed
1697               l   Don't scroll to bottom when a key is pressed
1698           "Pm = 1015" (rxvt-unicode) (Compile frills)
1699               h   Enable urxvt mouse coordinate reporting.
1700               l   Disable urxvt mouse coordinate reporting.
1701           "Pm = 1021" (rxvt)
1702               h   Bold/italic implies high intensity (see option -is)
1703               l   Font styles have no effect on intensity (Compile styles)
1704           "Pm = 1047" (X11 XTerm alternate screen buffer)
1705               h   Use Alternate Screen Buffer
1706               l   Use Normal Screen Buffer - clear Alternate Screen Buffer if returning from it
1707           "Pm = 1048" (X11 XTerm alternate DECSC)
1708               h   Save cursor position
1709               l   Restore cursor position
1710           "Pm = 1049" (X11 XTerm 1047 + 1048)
1711               h   Use Alternate Screen Buffer - clear Alternate Screen Buffer if switching to it
1712               l   Use Normal Screen Buffer
1713           "Pm = 2004" (X11 XTerm bracketed paste mode)
1714               h   Enable bracketed paste mode - prepend / append to the pasted text the control sequences ESC [ 200 ~ / ESC [ 201 ~
1715               l   Disable bracketed paste mode
1716
1717   XTerm Operating System Commands
1718       "ESC ] Ps;Pt ST"
1719           Set XTerm Parameters. 8-bit ST: 0x9c, 7-bit ST sequence: ESC \
1720           (0x1b, 0x5c), backwards compatible terminator BEL (0x07) is also
1721           accepted. any octet can be escaped by prefixing it with SYN (0x16,
1722           ^V).
1723
1724           Many of these settings can be queried by specifying "?" as
1725           parameter, but this requires insecure mode to be enabled for most
1726           of these.
1727
1728           Ps = 0     Change Icon Name and Window Title to Pt
1729           Ps = 1     Change Icon Name to Pt
1730           Ps = 2     Change Window Title to Pt
1731           Ps = 3     If Pt starts with a ?, query the (STRING) property of the window and return it (insecure mode). If Pt contains a =, set the named property to the given value, else delete the specified property.
1732
1733           Ps = 4     Pt is a semi-colon separated sequence of one or more semi-colon separated number/name pairs, where number is an index to a colour and name is the name of a colour. Each pair causes the numbered colour to be changed to name. Numbers 0-7 corresponds to low-intensity (normal) colours and 8-15 corresponds to high-intensity colours. 0=black, 1=red, 2=green, 3=yellow, 4=blue, 5=magenta, 6=cyan, 7=white
1734           Ps = 10    Change colour of text foreground to Pt
1735           Ps = 11    Change colour of text background to Pt
1736           Ps = 12    Change colour of text cursor foreground to Pt
1737           Ps = 13    Change colour of mouse foreground to Pt
1738           Ps = 17    Change background colour of highlight characters to Pt
1739           Ps = 19    Change foreground colour of highlight characters to Pt
1740           Ps = 20    Change background image to Pt (see the urxvt-background) extension documentation)
1741           Ps = 39    Change default foreground colour to Pt. [deprecated, use 10]
1742           Ps = 46    Change Log File to Pt unimplemented
1743           Ps = 49    Change default background colour to Pt. [deprecated, use 11]
1744           Ps = 50    Set fontset to Pt, with the following special values of Pt (rxvt) #+n change up n #-n change down n if n is missing of 0, a value of 1 is used empty change to font0 n change to font n
1745           Ps = 55    Log all scrollback buffer and all of screen to Pt [disabled]
1746           Ps = 701   Change current locale to Pt, or, if Pt is ?, return the current locale (insecure mode, Compile frills).
1747           Ps = 702   Request version if Pt is ?, returning rxvt-unicode, the resource name, the major and minor version numbers, e.g. ESC ] 702 ; rxvt-unicode ; urxvt ; 7 ; 4 ST.
1748           Ps = 704   Change colour of italic characters to Pt
1749           Ps = 705   Change background tint color to Pt (see the urxvt-background) extension documentation)
1750           Ps = 706   Change colour of bold characters to Pt
1751           Ps = 707   Change colour of underlined characters to Pt
1752           Ps = 708   Change colour of the border to Pt
1753           Ps = 710   Set normal fontset to Pt. Same as Ps = 50.
1754           Ps = 711   Set bold fontset to Pt. Similar to Ps = 50 (Compile styles).
1755           Ps = 712   Set italic fontset to Pt. Similar to Ps = 50 (Compile styles).
1756           Ps = 713   Set bold-italic fontset to Pt. Similar to Ps = 50 (Compile styles).
1757           Ps = 720   Move viewing window up by Pt lines, or clear scrollback buffer if Pt = 0 (Compile frills).
1758           Ps = 721   Move viewing window down by Pt lines, or clear scrollback buffer if Pt = 0 (Compile frills).
1759           Ps = 777   Call the perl extension with the given string, which should be of the form extension:parameters (Compile perl).
1760

Mouse Reporting

1762       When mouse reporting is enabled and none of the extended mouse modes
1763       (1005, 1006, 1015) is active, urxvt sends the following sequence on a
1764       mouse event:
1765
1766       "ESC [ M <b> <x> <y>"
1767
1768       The lower 2 bits of "<b>" indicate the button:
1769
1770       Button = "(<b> - SPACE) & 3"
1771
1772           0   Button1 pressed
1773           1   Button2 pressed
1774           2   Button3 pressed
1775           3   button released (X11 mouse report)
1776
1777       The upper bits of "<b>" indicate the modifiers when the button was
1778       pressed and are added together (X11 mouse report only):
1779
1780       State = "(<b> - SPACE) & ~3"
1781
1782           4    Shift
1783           8    Meta
1784           16   Control
1785           32   Motion Notify
1786           32   Double Click (rxvt extension), disabled by default
1787           64   Button1 is actually Button4, Button2 is actually Button5 etc.
1788
1789       "x" and "y" encode the coordinates (1|1 is the upper left corner, just
1790       as with cursor positioning):
1791
1792       Col = "<x> - SPACE"
1793       Row = "<y> - SPACE"
1794
1795       The parameters include an offset of 32 to ensure that they are
1796       printable characters.
1797
1798       Example: Shift-Button-1 press at top row, column 80.
1799
1800          ESC [ M $ p !
1801
1802       The largest coordinate that can be represented in this encoding is 223.
1803       The range can be extended by using one of the extended mouse modes,
1804       which should be enabled before enabling mouse reporting, for semi-
1805       obvious reasons.
1806
1807   Mode 1005
1808       If mode 1005 is active, urxvt sends the sequence
1809
1810       "ESC [ M <b> <x> <y>"
1811
1812       with the coordinates provided as characters in locale-encoding instead
1813       of 1 byte octets. This mode does not work sensibly in non-UTF-8 locales
1814       and should therefore be avoided.
1815
1816   Mode 1006
1817       If mode 1006 is active, urxvt sends the following sequences:
1818
1819       "ESC [ < <b>;<x>;<y> M"
1820           button press and motion
1821
1822       "ESC [ < <b>;<x>;<y> m"
1823           button release
1824
1825       where the parameters are provided as decimal numbers instead of octets
1826       and do not include an offset of 32.
1827
1828       The lower 2 bits of "b" encode the button number also on button release
1829       (instead of the value 3). The final character of the sequence (M or m)
1830       specifies the event type (press/motion or release).
1831
1832       Example: Shift-Button-1 press at top row, column 80.
1833
1834          ESC [ < 4 ; 80 ; 1 M
1835
1836   Mode 1015
1837       If mode 1015 is active, urxvt sends the sequence
1838
1839       "ESC [ <b>;<x>;<y> M"
1840
1841       where the parameters are provided as decimal numbers instead of octets
1842       and only "b" includes an offset of 32.
1843
1844       Example: Shift-Button-1 press at top row, column 80.
1845
1846          ESC [ 36 ; 80 ; 1 M
1847

Key Codes

1849       Note: Shift + F1-F10 generates F11-F20
1850
1851       For the keypad, use Shift to temporarily toggle Application Keypad mode
1852       and use Num_Lock to override Application Keypad mode, i.e. if Num_Lock
1853       is on the keypad is in normal mode. Also note that the values of
1854       BackSpace, Delete may have been compiled differently on your system.
1855
1856                      Normal       Shift         Control      Ctrl+Shift
1857       Tab            ^I           ESC [ Z       ^I           ESC [ Z
1858       BackSpace      ^?           ^?            ^H           ^H
1859       Find           ESC [ 1 ~    ESC [ 1 $     ESC [ 1 ^    ESC [ 1 @
1860       Insert         ESC [ 2 ~    paste         ESC [ 2 ^    ESC [ 2 @
1861       Execute        ESC [ 3 ~    ESC [ 3 $     ESC [ 3 ^    ESC [ 3 @
1862       Select         ESC [ 4 ~    ESC [ 4 $     ESC [ 4 ^    ESC [ 4 @
1863       Prior          ESC [ 5 ~    scroll-up     ESC [ 5 ^    ESC [ 5 @
1864       Next           ESC [ 6 ~    scroll-down   ESC [ 6 ^    ESC [ 6 @
1865       Home           ESC [ 7 ~    ESC [ 7 $     ESC [ 7 ^    ESC [ 7 @
1866       End            ESC [ 8 ~    ESC [ 8 $     ESC [ 8 ^    ESC [ 8 @
1867       Delete         ESC [ 3 ~    ESC [ 3 $     ESC [ 3 ^    ESC [ 3 @
1868       F1             ESC [ 11 ~   ESC [ 23 ~    ESC [ 11 ^   ESC [ 23 ^
1869       F2             ESC [ 12 ~   ESC [ 24 ~    ESC [ 12 ^   ESC [ 24 ^
1870       F3             ESC [ 13 ~   ESC [ 25 ~    ESC [ 13 ^   ESC [ 25 ^
1871       F4             ESC [ 14 ~   ESC [ 26 ~    ESC [ 14 ^   ESC [ 26 ^
1872       F5             ESC [ 15 ~   ESC [ 28 ~    ESC [ 15 ^   ESC [ 28 ^
1873       F6             ESC [ 17 ~   ESC [ 29 ~    ESC [ 17 ^   ESC [ 29 ^
1874       F7             ESC [ 18 ~   ESC [ 31 ~    ESC [ 18 ^   ESC [ 31 ^
1875       F8             ESC [ 19 ~   ESC [ 32 ~    ESC [ 19 ^   ESC [ 32 ^
1876       F9             ESC [ 20 ~   ESC [ 33 ~    ESC [ 20 ^   ESC [ 33 ^
1877       F10            ESC [ 21 ~   ESC [ 34 ~    ESC [ 21 ^   ESC [ 34 ^
1878       F11            ESC [ 23 ~   ESC [ 23 $    ESC [ 23 ^   ESC [ 23 @
1879       F12            ESC [ 24 ~   ESC [ 24 $    ESC [ 24 ^   ESC [ 24 @
1880
1881       F13            ESC [ 25 ~   ESC [ 25 $    ESC [ 25 ^   ESC [ 25 @
1882       F14            ESC [ 26 ~   ESC [ 26 $    ESC [ 26 ^   ESC [ 26 @
1883       F15 (Help)     ESC [ 28 ~   ESC [ 28 $    ESC [ 28 ^   ESC [ 28 @
1884       F16 (Menu)     ESC [ 29 ~   ESC [ 29 $    ESC [ 29 ^   ESC [ 29 @
1885       F17            ESC [ 31 ~   ESC [ 31 $    ESC [ 31 ^   ESC [ 31 @
1886       F18            ESC [ 32 ~   ESC [ 32 $    ESC [ 32 ^   ESC [ 32 @
1887       F19            ESC [ 33 ~   ESC [ 33 $    ESC [ 33 ^   ESC [ 33 @
1888       F20            ESC [ 34 ~   ESC [ 34 $    ESC [ 34 ^   ESC [ 34 @
1889                                                              Application
1890       Up             ESC [ A      ESC [ a       ESC O a      ESC O A
1891       Down           ESC [ B      ESC [ b       ESC O b      ESC O B
1892       Right          ESC [ C      ESC [ c       ESC O c      ESC O C
1893       Left           ESC [ D      ESC [ d       ESC O d      ESC O D
1894       KP_Enter       ^M                                      ESC O M
1895       KP_F1          ESC O P                                 ESC O P
1896       KP_F2          ESC O Q                                 ESC O Q
1897       KP_F3          ESC O R                                 ESC O R
1898       KP_F4          ESC O S                                 ESC O S
1899       KP_Multiply    *                                       ESC O j
1900       KP_Add         +                                       ESC O k
1901       KP_Separator   ,                                       ESC O l
1902       KP_Subtract    -                                       ESC O m
1903       KP_Decimal     .                                       ESC O n
1904       KP_Divide      /                                       ESC O o
1905       KP_0           0                                       ESC O p
1906       KP_1           1                                       ESC O q
1907       KP_2           2                                       ESC O r
1908       KP_3           3                                       ESC O s
1909       KP_4           4                                       ESC O t
1910       KP_5           5                                       ESC O u
1911       KP_6           6                                       ESC O v
1912       KP_7           7                                       ESC O w
1913       KP_8           8                                       ESC O x
1914       KP_9           9                                       ESC O y
1915

CONFIGURE OPTIONS

1917       General hint: if you get compile errors, then likely your configuration
1918       hasn't been tested well. Either try with "--enable-everything" or use
1919       the default configuration (i.e. no "--enable-xxx" or "--disable-xxx"
1920       switches). Of course, you should always report when a combination
1921       doesn't work, so it can be fixed. Marc Lehmann <rxvt@schmorp.de>.
1922
1923       All
1924
1925       --enable-everything
1926           Add (or remove) support for all non-multichoice options listed in
1927           "./configure --help", except for "--enable-assert" and
1928           "--enable-256-color".
1929
1930           You can specify this and then disable options you do not like by
1931           following this with the appropriate "--disable-..." arguments, or
1932           you can start with a minimal configuration by specifying
1933           "--disable-everything" and than adding just the "--enable-..."
1934           arguments you want.
1935
1936       --enable-xft (default: on)
1937           Add support for Xft (anti-aliased, among others) fonts. Xft fonts
1938           are slower and require lots of memory, but as long as you don't use
1939           them, you don't pay for them.
1940
1941       --enable-font-styles (default: on)
1942           Add support for bold, italic and bold italic font styles. The fonts
1943           can be set manually or automatically.
1944
1945       --with-codesets=CS,... (default: all)
1946           Compile in support for additional codeset (encoding) groups ("eu",
1947           "vn" are always compiled in, which includes most 8-bit character
1948           sets). These codeset tables are used for driving X11 core fonts,
1949           they are not required for Xft fonts, although having them compiled
1950           in lets rxvt-unicode choose replacement fonts more intelligently.
1951           Compiling them in will make your binary bigger (all of together
1952           cost about 700kB), but it doesn't increase memory usage unless you
1953           use a font requiring one of these encodings.
1954
1955           all      all available codeset groups
1956           zh       common chinese encodings
1957           zh_ext   rarely used but very big chinese encodings
1958           jp       common japanese encodings
1959           jp_ext   rarely used but big japanese encodings
1960           kr       korean encodings
1961
1962       --enable-xim (default: on)
1963           Add support for XIM (X Input Method) protocol. This allows using
1964           alternative input methods (e.g. kinput2) and will also correctly
1965           set up the input for people using dead keys or compose keys.
1966
1967       --enable-unicode3 (default: off)
1968           Recommended to stay off unless you really need non-BMP characters.
1969
1970           Enable direct support for displaying unicode codepoints above 65535
1971           (the basic multilingual page). This increases storage requirements
1972           per character from 2 to 4 bytes. X11 fonts do not yet support these
1973           extra characters, but Xft does.
1974
1975           Please note that rxvt-unicode can store unicode code points >65535
1976           even without this flag, but the number of such characters is
1977           limited to a few thousand (shared with combining characters, see
1978           next switch), and right now rxvt-unicode cannot display them
1979           (input/output and cut&paste still work, though).
1980
1981       --enable-combining (default: on)
1982           Enable automatic composition of combining characters into composite
1983           characters. This is required for proper viewing of text where
1984           accents are encoded as separate unicode characters. This is done by
1985           using precomposed characters when available or creating new pseudo-
1986           characters when no precomposed form exists.
1987
1988           Without --enable-unicode3, the number of additional precomposed
1989           characters is somewhat limited (the 6400 private use characters
1990           will be (ab-)used). With --enable-unicode3, no practical limit
1991           exists.
1992
1993           This option will also enable storage (but not display) of
1994           characters beyond plane 0 (>65535) when --enable-unicode3 was not
1995           specified.
1996
1997           The combining table also contains entries for arabic presentation
1998           forms, but these are not currently used. Bug me if you want these
1999           to be used (and tell me how these are to be used...).
2000
2001       --enable-fallback[=CLASS] (default: Rxvt)
2002           When reading resource settings, also read settings for class CLASS.
2003           To disable resource fallback use --disable-fallback.
2004
2005       --with-res-name=NAME (default: urxvt)
2006           Use the given name as default application name when reading
2007           resources. Specify --with-res-name=rxvt to replace rxvt.
2008
2009       --with-res-class=CLASS (default: URxvt)
2010           Use the given class as default application class when reading
2011           resources. Specify --with-res-class=Rxvt to replace rxvt.
2012
2013       --enable-utmp (default: on)
2014           Write user and tty to utmp file (used by programs like w) at start
2015           of rxvt execution and delete information when rxvt exits.
2016
2017       --enable-wtmp (default: on)
2018           Write user and tty to wtmp file (used by programs like last) at
2019           start of rxvt execution and write logout when rxvt exits.  This
2020           option requires --enable-utmp to also be specified.
2021
2022       --enable-lastlog (default: on)
2023           Write user and tty to lastlog file (used by programs like
2024           lastlogin) at start of rxvt execution.  This option requires
2025           --enable-utmp to also be specified.
2026
2027       --enable-pixbuf (default: on)
2028           Add support for GDK-PixBuf to be used for background images.  It
2029           adds support for many file formats including JPG, PNG, TIFF, GIF,
2030           XPM, BMP, ICO and TGA.
2031
2032       --enable-startup-notification (default: on)
2033           Add support for freedesktop startup notifications. This allows
2034           window managers to display some kind of progress indicator during
2035           startup.
2036
2037       --enable-transparency (default: on)
2038           Add support for using the root pixmap as background to simulate
2039           transparency.  Note that this feature depends on libXrender and on
2040           the availability of the RENDER extension in the X server.
2041
2042       --enable-fading (default: on)
2043           Add support for fading the text when focus is lost.
2044
2045       --enable-rxvt-scroll (default: on)
2046           Add support for the original rxvt scrollbar.
2047
2048       --enable-next-scroll (default: on)
2049           Add support for a NeXT-like scrollbar.
2050
2051       --enable-xterm-scroll (default: on)
2052           Add support for an Xterm-like scrollbar.
2053
2054       --disable-backspace-key
2055           Removes any handling of the backspace key by us - let the X server
2056           do it.
2057
2058       --disable-delete-key
2059           Removes any handling of the delete key by us - let the X server do
2060           it.
2061
2062       --disable-resources
2063           Removes any support for resource checking.
2064
2065       --disable-swapscreen
2066           Remove support for secondary/swap screen.
2067
2068       --enable-frills (default: on)
2069           Add support for many small features that are not essential but nice
2070           to have. Normally you want this, but for very small binaries you
2071           may want to disable this.
2072
2073           A non-exhaustive list of features enabled by "--enable-frills"
2074           (possibly in combination with other switches) is:
2075
2076             MWM-hints
2077             EWMH-hints (pid, utf8 names) and protocols (ping)
2078             urgency hint
2079             separate underline colour (-underlineColor)
2080             settable border widths and borderless switch (-w, -b, -bl)
2081             visual depth selection (-depth)
2082             settable extra linespacing (-lsp)
2083             iso-14755 5.1 (basic) support
2084             tripleclickwords (-tcw)
2085             settable insecure mode (-insecure)
2086             keysym remapping support
2087             cursor blinking and underline cursor (-bc, -uc)
2088             XEmbed support (-embed)
2089             user-pty (-pty-fd)
2090             hold on exit (-hold)
2091             compile in built-in block graphics
2092             skip builtin block graphics (-sbg)
2093             separate highlight colour (-highlightColor, -highlightTextColor)
2094             focus reporting mode (1004).
2095             extended mouse reporting modes (1005, 1006 and 1015).
2096             visual selection via -visual and -depth.
2097             systemd socket activation
2098
2099           It also enables some non-essential features otherwise disabled,
2100           such as:
2101
2102             some round-trip time optimisations
2103             nearest colour allocation on pseudocolor screens
2104             UTF8_STRING support for selection
2105             sgr modes 90..97 and 100..107
2106             backindex and forwardindex escape sequences
2107             view change/zero scrollback escape sequences
2108             locale switching escape sequence
2109             window op and some xterm/OSC escape sequences
2110             rectangular selections
2111             trailing space removal for selections
2112             verbose X error handling
2113
2114       --enable-iso14755 (default: on)
2115           Enable extended ISO 14755 support (see urxvt(1)).  Basic support
2116           (section 5.1) is enabled by "--enable-frills", while support for
2117           5.2, 5.3 and 5.4 is enabled with this switch.
2118
2119       --enable-keepscrolling (default: on)
2120           Add support for continual scrolling of the display when you hold
2121           the mouse button down on a scrollbar arrow.
2122
2123       --enable-selectionscrolling (default: on)
2124           Add support for scrolling when the selection moves to the top or
2125           bottom of the screen.
2126
2127       --enable-mousewheel (default: on)
2128           Add support for scrolling via mouse wheel or buttons 4 & 5.
2129
2130       --enable-slipwheeling (default: on)
2131           Add support for continual scrolling (using the mouse wheel as an
2132           accelerator) while the control key is held down.  This option
2133           requires --enable-mousewheel to also be specified.
2134
2135       --enable-smart-resize (default: off)
2136           Add smart growth/shrink behaviour when resizing.  This should keep
2137           the window corner which is closest to a corner of the screen in a
2138           fixed position.
2139
2140       --enable-text-blink (default: on)
2141           Add support for blinking text.
2142
2143       --enable-pointer-blank (default: on)
2144           Add support to have the pointer disappear when typing or inactive.
2145
2146       --enable-perl (default: on)
2147           Enable an embedded perl interpreter. See the urxvtperl(3) manpage
2148           for more info on this feature, or the files in src/perl/ for the
2149           extensions that are installed by default.  The perl interpreter
2150           that is used can be specified via the "PERL" environment variable
2151           when running configure. Even when compiled in, perl will not be
2152           initialised when all extensions have been disabled "-pe ""
2153           --perl-ext-common """, so it should be safe to enable from a
2154           resource standpoint.
2155
2156       --enable-assert (default: off)
2157           Enables the assertions in the code, normally disabled. This switch
2158           is only useful when developing rxvt-unicode.
2159
2160       --enable-256-color (default: off)
2161           Force use of so-called 256 colour mode, to work around buggy
2162           applications that do not support termcap/terminfo, or simply
2163           improve support for applications hardcoding the xterm 256 colour
2164           table.
2165
2166           This switch breaks termcap/terminfo compatibility to
2167           "TERM=rxvt-unicode", and consequently sets "TERM" to
2168           "rxvt-unicode-256color" by default (doc/etc/ contains
2169           termcap/terminfo definitions for both).
2170
2171           It also results in higher memory usage and can slow down urxvt
2172           dramatically when more than six fonts are in use by a terminal
2173           instance.
2174
2175       --with-name=NAME (default: urxvt)
2176           Set the basename for the installed binaries, resulting in "urxvt",
2177           "urxvtd" etc.). Specify "--with-name=rxvt" to replace with "rxvt".
2178
2179       --with-term=NAME (default: rxvt-unicode)
2180           Change the environmental variable for the terminal to NAME.
2181
2182       --with-terminfo=PATH
2183           Change the environmental variable for the path to the terminfo tree
2184           to PATH.
2185
2186       --with-x
2187           Use the X Window System (pretty much default, eh?).
2188

AUTHORS

2190       Marc Lehmann <rxvt@schmorp.de> converted this document to pod and
2191       reworked it from the original Rxvt documentation, which was done by
2192       Geoff Wing <gcw@pobox.com>, who in turn used the XTerm documentation
2193       and other sources.
2194
2195
2196
21979.26                              2021-05-14                          urxvt(7)
Impressum