The setterm
utility is intended for use with the Linux console. According to the console_codes manual page:
The Linux console implements a large subset of the VT102 and
ECMA-48/ISO 6429/ANSI X3.64 terminal controls, plus certain private-
mode sequences for changing the color palette, character-set mapping,
and so on.
Since the program is hard-coded,
/* -regtabs. */
if (ctl->opt_regtabs && vc_only(ctl, "--regtabs")) {
int i;
fputs("\033[3g\r", stdout);
for (i = ctl->opt_rt_len + 1; i <= TABS_MAX; i += ctl->opt_rt_len)
printf("\033[%dC\033H", ctl->opt_rt_len);
putchar('\r');
}
it just happens to work with xterm since xterm implements VT100 controls (plus more).
As for large subset, that is debatable. In a quick count of the items in console_codes
, I see 79 control sequences. That is far less than any of the xterm look-alikes documented in the xterm FAQ Comparing versions, by counting controls. By itself, 79 is not large. The VT102 itself (not an xterm look-alike) had 104. ISO-6429 (aka ECMA-48) documents 20 modes and 162 sequences. Whether you count the total as 182 or 162, 50% is not a large subset.
Rather than using a Linux console utility, there is a more portable choice: the tabs
utility (in POSIX as well as Solaris). It is part of the ncurses utilities (and probably installed on your Linux system).
For the example given in the question, you could do this:
tabs -4
That uses the terminal database, rather than being hard-coded. Tabs and the control sequences to set them are documented in ECMA-48 and other places such as the terminfo(5) manual page.
And tabs
works with xterm.
If no fonts are specified in .Xdefaults
, .xresources
or on the command line, the default single-byte font rxvt
uses is 7x14
.
From the file src/defaultfont.h
in the rxvt source:
82 #define NFONT_LIST \
83 "7x14", "6x10", "6x13", "8x13", "8x16", "10x20", "12x24"
These fonts are loaded into the default rxvt font set in their respective positions when nothing has been specified for that position. Note that if you use a multi-byte encoding, there is a different default.
In response to the comment below, I cannot say for sure whether that is 6x13 or not, all I can point to is this logic in defaultfont.c
300 if (encoding >= ENC_ISO8859_1 && encoding <= ENC_ISO8859_LAST) {
301 /* fallback for ISO-8859-* encodings */
302 k = encoding - ENC_ISO8859_1 + 1;
303 MIN_IT(k, 99999);
304 } else
305 /* fallback for "C", "POSIX", and invalid locales */
306 k = 0;
:
308 for (j = 0; j < MAX_NFONTS; j++) {
309 if (rs[Rs_font + j] == NULL) {
310 if (k == 0)
311 rs[Rs_font + j] = def_fontName[j];
312 else {
313 /* couple of wasted bytes each but lots of future expansion */
314 rs[Rs_font + j] = rxvt_malloc(STRLEN(defaultfont_8859[j]) + 4);
315 sprintf((char *)rs[Rs_font + j], defaultfont_8859[j], k);
316 }
317 }
If the locale is C the Rs_font[0]
is 7x14
and Rs_font[2]
is 6x13
. When and where [0]
vs [2]
are used to render text is beyond my motivation to search through this unfamiliar code.
If the encoding is not C/POSIX, the 8859 fonts loaded by the above code are:
#define NFONT_LIST_ISO8859X \
"-misc-fixed-medium-r-normal--14-130-75-75-c-70-iso8859-%d", /*xf*/ \
"-misc-fixed-medium-r-normal--10-100-75-75-c-60-iso8859-%d", /*xf*/ \
"-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-%d",/*xf*/ \
"-misc-fixed-medium-r-normal--13-120-75-75-c-80-iso8859-%d", /*xf*/ \
"-misc-fixed-medium-r-normal--16-120-100-100-c-80-iso8859-%d", /*xf*/ \
"-misc-fixed-medium-r-normal--20-200-75-75-c-100-iso8859-%d", /*xf*/ \
"-misc-fixed-medium-r-normal--24-170-100-100-c-120-iso8859-%d" /*xf*/
And if multi-byte encodings are in use, a whole different encoding specific set of fonts are used for the default.
Best Answer
There is no specific
.Xresources
to examine, so only general advice is possible.The
.Xresources
file is usually loaded byxrdb
(a prop for desktop settings). You can test this file by simply loading directly withxrdb
, e.g.,or just
if you do not care for the desktop-designer's choices.
If there is some conflicting resource definition, the more specific one is used. For instance, if you had
and some desktop feature loads
you would get a gray background because the
.
is more specific than*
.You can see what
xrdb
did:If there is a resource needed by the application which is not set in the root window using
xrdb
, that resource is loaded according to the usual X resource rules (e.g., the system app-defaults files as well as your own.Xdefaults
file).If you are not running in a desktop environment that automatically runs
xrdb
, much of the advice regardingxrdb
is probably not useful.Further: