Placing the BIND Data
@@ -216,10 +227,20 @@ although not nearly as many as BIND 8 did.
One file that BIND will need inside its jail is good ol' /dev/null>.
Note that the exact command necessary to create this device node may vary from
system to system; check your /dev/MAKEDEV> script to be sure. Some
-systems may also require /dev/zero>, which can created similarly. For
-most Linux systems, we can use the following command:
+systems may also require /dev/zero>, which can created similarly. It's
+reported that the BIND 9.2.0 release candidates now require /dev/random>
+as well. For most Linux systems, we can use the following commands:
# mknod /chroot/named/dev/null c 1 3
+# mknod /chroot/named/dev/random c 1 8
+# chmod 666 /chroot/named/dev/{null,random}
+
+
+For FreeBSD 4.3, this is:
+
+# mknod /chroot/named/dev/null c 2 2
+# mknod /chroot/named/dev/random c 2 3
+# chmod 666 /chroot/named/dev/{null,random}
You also need another file in the /etc> directory inside the jail. You
@@ -261,6 +282,10 @@ to
daemon syslogd -m 0 -a /chroot/named/dev/log
+Interestingly, as of Red Hat 7.2, Red Hat has apparently made this process
+even easier. There is now a file called /etc/sysconfig/syslog> in which
+extra parameters for syslogd can be defined.
+
On Caldera OpenLinux systems, they use a daemon launcher called ssd>,
which reads configuration from /etc/sysconfig/daemons/syslog>. You
simply need to modify the options line to look like this:
@@ -279,6 +304,14 @@ SYSLOGD_PARAMS="-a /chroot/named/dev/log"
should do the trick.
+And, last but not least, for FreeBSD 4.3 you can apparently just edit the
+rc.conf> file and put in the following:
+
+syslogd_flags="-s -l /chroot/named/dev/log"
+
+The -s> is for security reasons, and is part of the default settings.
+The -l> is a local path on which to put another logging node.
+
Once you've figured out how to make this change for your system, simply
restart syslogd>, either by killing it and launching it again (with
the extra parameters), or by using the SysV-init script to do it for you:
@@ -334,6 +367,13 @@ directories immutable, using the chattr> tool on ext2 filesystems.
# chattr +i etc etc/localtime var
+Equivalently, on FreeBSD 4.3, you want to look into chflags> if you
+wish to make things immutable. As an example, the following should change
+everything in the /chroot/named/etc> directory to immutable:
+
+# chflags schg /chroot/named/etc/*(*).
+
+
It would be nice to do this for the dev> directory too, but unfortunately
that would prevent syslogd> from creating its dev/log> socket.
You may also choose to set the immutable bit on other files in the jail as
@@ -466,6 +506,12 @@ esac
exit 0
+As with syslogd, as of Red Hat 7.2 this process is now even easier. There is
+a file called /etc/sysconfig/named> in which extra parameters for syslogd
+can be defined. The default /etc/rc.d/init.d/named> on Red Hat 7.2,
+however, will check for the existance of /etc/named.conf> before
+starting. You will need to correct this path.
+
On Caldera OpenLinux systems, you simply need to modify the variables defined
at the top, and it will apparently take care of the rest for you:
@@ -474,6 +520,14 @@ DAEMON=/usr/local/sbin/$NAME
OPTIONS="-t /chroot/named -u named -c /etc/named.conf"
+And for FreeBSD 4.3, you can edit the rc.conf> file and put in the
+following:
+
+named_enable="YES"
+named_program="chroot/named/bin/named"
+named_flags="-u named -t /chroot/named -c /etc/namedb/named.conf"
+
+
Configuration Changes
@@ -544,6 +598,16 @@ better.
<brian at zerobelow.org>> for providing good suggestions for
further tightening the jail.
+- Robert Dalton <support at accesswest.com>> for suggesting
+a couple more example commands, and pointing out BIND 9.2.0's need of
+/dev/random>.
+
+
- Eric McCormick <hostmaster at cybertime.net>> for the FreeBSD
+4.3 information.
+
+
- Tan Zheng Da <tzd at pobox.com>> for the details about the
+changes in Red Hat 7.2 that make this a little easier.
+
And last but certainly not least, I'd like to thank Nakano Takeo <nakano
diff --git a/LDP/howto/linuxdoc/Keyboard-and-Console-HOWTO.sgml b/LDP/howto/linuxdoc/Keyboard-and-Console-HOWTO.sgml
index f5ec46be..32e843b1 100644
--- a/LDP/howto/linuxdoc/Keyboard-and-Console-HOWTO.sgml
+++ b/LDP/howto/linuxdoc/Keyboard-and-Console-HOWTO.sgml
@@ -4,7 +4,7 @@
The Linux keyboard and console HOWTO
Andries Brouwer, v2.8, 25 February 1998
+v2.12, 2001-09-21
This note contains some information about the Linux keyboard
and console, and the use of non-ASCII characters.
@@ -23,27 +23,39 @@ It describes Linux 2.0.
The following packages contain keyboard or console related programs.
-
-
+
+
-
+See
+for a package that handles console fonts.
+
+Packages like
The X distribution contains .
/usr/lib/terminfo/tic, see tic(1).
Their contents can be examined using the program Keyboard generalities
keyboard!theory of operation
-You press a key, and the keyboard controller sends scancodes to the
-kernel keyboard driver. Some keyboards can be programmed, but usually
-the scancodes corresponding to your keys are fixed.
+You press a key, and the keyboard controller sends
+
+to the kernel keyboard driver. Some keyboards can be programmed,
+but usually the scancodes corresponding to your keys are fixed.
The kernel keyboard driver just transmits whatever it receives
to the application program when it is in scancode mode,
like when keycode mode (as used, for example, by keycode mode (as used, for example, by
The translation between unusual scancodes and keycodes can be set using the
-utility
Where it says `transmitted to the application' in the above description,
this really means `transmitted to the terminal driver'. That is, further
@@ -126,10 +143,10 @@ the correspondence between Unicode values and font positions,
and the obtained 8- or 9-bit font indices are then written to video memory,
where they cause the display of character shapes found in the video card's
character ROM.
-One can load one's own fonts into character ROM using
-/dev/tty2 then typing
on some other VT (where 4 symbols are typed to /dev/tty2
-(perhaps using ˆL) will fix things. Of course the permanent fix
+(perhaps using Ctrl-L) will fix things. Of course the permanent fix
is to use the right termcap or terminfo entry.
+A command that only changes the number of lines is
+
+ % echo -e "\033[1;25r"
+
Why is it that you sometimes get a lot of line-drawing characters,
e.g., after catting a binary to the screen?
@@ -198,7 +219,7 @@ Now do (typing blindly)
^D
and all is well again. (Three symbols typed to each
% setfont -u def
-The Ethiopian fonts and the
% stty tab3
(see stty(1)).
You can change the video mode using Keyboard hardware reset
keyboard!resetting
@@ -341,8 +370,9 @@ How come this is not right by default? It is, if you use the right
˜/.inputrc, ˜/.emacs etc.) and
-are unaffected by the setting of the erase character.
+keybindings (defined in ˜/.inputrc,
+˜/.emacs etc.) and are unaffected by the setting
+of the erase character.
The standard Unix tty driver does not recognize a cursor, or keys
(like the arrow keys) to move the current position, and hence does not
@@ -388,7 +418,7 @@ when initialising the X keymap. Although the two systems are not
/etc/rc.local
(or wherever you keep your local boot-time stuff):
@@ -411,6 +441,34 @@ But what character sequence is MetaX?
That is determined (per-tty) by the Meta flag, set by the command
/etc/sysconfig/keyboard and the /etc/rc.d/init.d/keytable.
+Or one may have the actual default keymap in /etc/default.keytab
+and the loadkeys command that loads it in /etc/rc.d/boot.
+Etc. Instead of adding a local modification to the default, one can
+of course change the default by editing the default keymap or changing
+the name of the keymap to be loaded at boot time. Note that /usr/lib/kbd or /usr/share/kbd (just like all other
+keymaps) and this may not yet be available in single user boot before
+/usr has been mounted.
+
+`How do I get a dvorak keyboard?'
+dvorak keyboard
+The command
+
+ % loadkeys dvorak
+
+will give you a dvorak layout, probably by loading
+something like /usr/lib/kbd/keymaps/i386/dvorak/dvorak.map.gz.
+Under
+ XkbLayout "dvorak"
+
+in XF86Config.
+
`Why doesn't the Backspace key generate BackSpace by default?'
backspace key!not generating correct keycode
@@ -452,7 +510,7 @@ For example, in incremental search mode one finds the code
This means that it may be a bad idea to use the above two
global-set-key commands. There are too many places where
-there are built-in assumptions about ˆH = help and DEL = delete.
+there are built-in assumptions about Ctrl-H = help and DEL = delete.
That doesn't mean that you have to setup keys so that Backspace
generates DEL. But if it doesn't then it is easiest to remap
them at the lowest possible level in emacs.
@@ -480,7 +538,7 @@ Note that under X emacs can distinguish between Ctrl-h and the
Backspace key (regardless of what codes these produce on the console),
and by default emacs will view the Backspace key as DEL
(and do deletion things, as bound to that character, rather than
-help things, bound to ˆH). One can distinguish Backspace and Delete,
+help things, bound to Ctrl-H). One can distinguish Backspace and Delete,
e.g. by
(global-unset-key [backspace] )
@@ -498,6 +556,14 @@ Put in your
+How to tell xterm to interchange Delete and Backspace
+xterm!swapping DEL, BS
+
+XTerm*VT100.Translations: #override\n\
+ BackSpace : string(0x7f)\n\
+ Delete : string(0x08)\n
+
+
How to tell xterm about your favourite tty modes
xterm!setting tty modes for
@@ -512,10 +578,19 @@ If you don't like that, you might put something like
in /usr/lib/X11/app-defaults/XTerm or in
$HOME/.Xresources, assuming that you have a line
- xrdb $HOME/.Xresources
+ xrdb -merge $HOME/.Xresources
in your $HOME/.xinitrc or $HOME/.xsession.
+How to tell non-Motif X applications that the Del key deletes forward
+Put
+
+*Text.translations: #override \
+ ~Shift ~Meta Delete: delete-next-character()
+
+into .Xresources to make non-Motif X applications such as
+xfig, xedit, etc., work correctly. (Daniel T. Cobra)
+
How to tell xmosaic that the Backspace key generates a DEL
xmosaic!remapping BS key
Netscape!remapping BS
@@ -527,7 +602,10 @@ Putting
*XmTextField.translations: #override\n\
osfDelete: delete-previous-character()
-in your $HOME/.Xresources helps.
+in your $HOME/.Xdefaults or
+$HOME/.Xresources helps.
+(What file? The file that is fed to xrdb, for example
+in .xinitrc.)
The netscape FAQ, however, says:
@@ -607,6 +685,41 @@ particular program only, probably the fault is elsewhere.
Of course it is a good idea anyway to correct your termcap (terminfo) entry.
See also below under "The TERM variable".
+A complete solution
+There are many possibilities to get a functioning system.
+Can't you give one complete set of settings that works?
+delete key!a solution
+backspace key!a solution
+
+One way of getting a setup that works in all contexts
+is to have the Backspace key generate DEL when on the
+console (or xterm), and BackSpace when under X.
+Maybe that is most convenient - there are too many X utilities
+that expect BackSpace, and emacs on the console or xterm
+expects DEL, while emacs under X can distinguish [BackSpace]
+from Ctrl-H and does the right thing.
+
+What is needed?
+No loadkeys changes, since the Backspace key already generates
+DEL by default. No stty settings, they are OK by default.
+No X settings, they are OK by default.
+One just has to tell xterm that the Backspace key should generate DEL:
+put
+
+XTerm*VT100.Translations: #override\n\
+ BackSpace : string(0x7f)\n\
+
+in
+xrdb -merge .Xresources
+
+in .
+
The console character sets
console character sets
character sets, console
@@ -617,15 +730,15 @@ user byte, and next where this symbol is located in the current font.
The kernel knows about 5 translations of bytes into console-screen symbols.
In Unicode (UTF-8) mode, the UTF-8 code is just converted directly into
Unicode. The assumption is that almost all symbols one needs are present
-in Unicode, and for the cases where this does not hold the codes 0xff**
-are reserved for direct font access.
+in Unicode, and for the cases where this does not hold the codes
+0xf000-0xf1ff are reserved for direct font access.
When not in Unicode mode, one of four translation tables is used.
The four tables are: a) Latin1 -> Unicode, b) VT100 graphics -> Unicode,
c) PC -> Unicode, d) user-defined.
There are two character sets, called G0 and G1, and one of them
is the current character set. (Initially G0.)
-Typing ˆN causes G1 to become current, ˆO causes G0 to become current.
+Typing Ctrl-N causes G1 to become current, Ctrl-O causes G0 to become current.
These variables G0 and G1 point at a translation table, and can be changed
by the user. Initially they point at tables a) and b), respectively.
@@ -635,8 +748,8 @@ The sequences ESC ) B and ESC ) 0 and ESC ) U and ESC ) K cause G1 to point
at translation table a), b), c) and d), respectively.
The sequence ESC c causes a terminal reset, which is what you want if the
-screen is all garbled. The oft-advised echo ˆ[c.
If your termcap entry for the console is correct (and has an entry
@@ -716,7 +829,7 @@ command.
Fortunately it is possible to create a new console upon a single
keystroke, regardless of what is happening at the current console.
-If you have
loadkeys << EOF
alt keycode 103 = Spawn_Console
@@ -760,8 +873,8 @@ to also add entries for them in these files.
If you press Ctrl-Alt-Del (or whatever key was assigned the keysym Boot by
loadkeys) then either the machine reboots immediately (without sync), or
-/etc/inittab (which means that you can run an arbitrary program
@@ -849,11 +962,11 @@ combinations are user-settable. Today there are 68 combinations
defined by default; you can see them by saying "dumpkeys | grep compose".
-
Then there are `Sticky' modifier keys (since 1.3.33). For example,
-one can type ˆC as SControl, C and Ctrl-Alt-BackSpace as SControl, SAlt,
-BackSpace.
+one can type Ctrl-C as SControl, C and Ctrl-Alt-BackSpace as SControl,
+SAlt, BackSpace.
-Note that there are at least three such composition mechanisms:
+Note that there are at least four such composition mechanisms:
-
The Linux keyboard driver mechanism, used in conjunction with loadkeys.
@@ -866,12 +979,16 @@ name="http://wauug.erols.com/~balsa/linux/deadkeys/index.html">.
-
The emacs mechanism obtained by loading "iso-insert.el" or
calling `iso-accents-mode'.
+
-
+The vim mechanism: insert a composed symbol by pressing Ctrl-K
+followed by two symbols. A list of the possible combinations is
+obtained by the command :digraphs.
For X the order of the two symbols is arbitrary: both Compose-,-c and
Compose-c-, yield a c-cedilla; for Linux and emacs only the former sequence
-works by default. For X the list of compose combinations is fixed. Linux
-and emacs are flexible.
-The three default lists are somewhat similar, but the details are different.
+works by default. For X and vim the list of compose combinations is fixed.
+Linux and emacs are flexible.
+The default lists are somewhat similar, but the details are different.
The SysRq key
SysRq key
@@ -912,7 +1029,31 @@ of your keymap, or even of the entire kernel, is uncertain.
If you use a dvorak keyboard - bad luck! Most other people will
be able to survive: the dangerous letters A,M,Q,W,Y,Z that are
differently placed on English, French and German keyboards, are
-not used for actions.
+not used for actions. (But if your finger slips and you hit L
+instead of K - bye bye to your system.)
+
+In Linux 2.3.13 the possibility to enable/disable SysRq was added.
+
+ echo 0 > /proc/sys/kernel/sysrq
+
+will disable it (if the kernel was compiled with CONFIG_MAGIC_SYSRQ).
+
+Problems
+A good keyboard accurately reports multiple key presses.
+Especially for people using a keyboard as Braille input device,
+where they have to be able to press up to six keys simultaneously,
+this is important. Many modern keyboards fail here due to sloppy
+design and testing - they misreport or fail in other ways when
+four or more keys are pressed simultaneously, sometimes already
+when two non-modifier keys are pressed simultaneously.
+This affects Linux users a bit: the SysRq key is not a modifier key,
+and people report problems using Alt-SysRq-X for various
+letters or digits X.
+
+Long ago a similar problem (`ghosting') was caused by the design
+of the scan matrix: when three keys were pressed a fourth was
+also seen. That problem was solved by the use of diodes.
+Today it is the interface logic that is deficient.
How to get out of raw mode
raw mode, exiting
@@ -1135,9 +1276,6 @@ D. For
set meta-flag on
set convert-meta off
-
-and, according to the Danish HOWTO,
-
set output-meta on
into your $HOME/.inputrc.
@@ -1175,7 +1313,7 @@ J. For sunsite.unc.edu:/pub/Linux/apps/editors/joe-1.0.8-linux.tar.gz
+metalab.unc.edu:/pub/Linux/apps/editors/joe-1.0.8-linux.tar.gz
is said to work after editing the configuration file. Someone else said:
/isr/lib/joerc in the
first column.
@@ -1184,23 +1322,54 @@ M. For LaTeX: \documentstyle[isolatin]{article}.
For LaTeX2e: \documentclass{article}\usepackage{isolatin}
where isolatin.sty is available from
.
+name="ftp.vlsivie.tuwien.ac.at/pub/8bit">.
A nice discussion on the topic of ISO-8859-1 and how to manage 8-bit
characters is contained in the file grasp.insa-lyon.fr:/pub/faq/fr/accents
(in French). Another fine discussion (in English) can be found in
-, which
-is mirrored in
-.
+.
If you need to fix a program that behaves badly with 8-bit characters,
one thing to keep in mind is that if you have a signed char type then
characters may be negative, and using them as an array index will fail.
Several programs can be fixed by judiciously adding (unsigned char) casts.
-What precisely does XFree86-2.1 do when it initializes its keymap?
+X
+
+This FAQ/HOWTO is about the Linux keyboard and console, not about X,
+which substitutes its own handling. However, it seems useful to
+document some of the Linux keyboard and console related properties
+of X.
+
+First of all, when X is started (say using /dev/tty12,
+but that it will not fail when the indicated console was in use already.
+When X finishes, it will return to the original console.
+While it is running one can use Ctrl-Alt-Fn to switch to VTn.
+
+The XFree86 keymap mechanism is much poorer than the Linux mechanism.
+For each keycode there are at most 4 symbols defined, namely for the
+4 keymaps plain, shift, mod, mod+shift. What is the modifier mod?
+It is the one designated by the symbol
+keycode 64 = Mode_switch
+keycode 113 = Mode_switch
+keycode 38 = a A aring Aring
+keycode 26 = e E ae AE
+keycode 32 = o O oslash Ooblique
+
+will make both Alt keys into mod keys, so that Alt+a gives å (a-ring), etc.
+(Note the illogical naming of oslash and Ooblique.)
+Such an What precisely does XFree86-2.1 do when it initializes its keymap?
keymap!initialization by XFree86
XFree86!keymap initialization
@@ -1229,7 +1398,8 @@ Caps_On and Boot are ignored, as are the dead diacriticals, and the locks
(except for ShiftLock), and the "ASCII-x" keys.
Next, the definitions in the dumpkeys to see what keycodes are still unused.
+Typically values like 89-95 and 112-118 and 120-127 are free.
+Now
+
+ % setkeycodes e05b 125
+ % setkeycodes e05c 126
+ % setkeycodes e05d 127
+
+assigns keycodes to these scancode sequences, and
+
+ % loadkeys
+ keycode 125 = Decr_Console
+ keycode 126 = Incr_Console
+ keycode 127 = KeyboardSignal
+ %
+
+would make these Windows keys go to the previous or next virtual console,
+and let the Menu key create a fresh virtual console (in case you have
+something like Examples of use of loadkeys and xmodmap
loadkeys!example using
@@ -1312,7 +1509,7 @@ will do this. More explicitly, the procedure is like this:
%
The format of the table can be guessed by looking at the output
-of
loadkeys my_new_keymap
@@ -1321,10 +1518,13 @@ in /etc/rc.local or so, to execute it automatically at boot-up.
Note that changing modifier keys is tricky, and a newbie can easily
get into a situation only an expert can get out of.
-The default directory for keymaps is /usr/lib/kbd/keytables.
+The default directory for keymaps is /usr/lib/kbd/keymaps.
The default extension for keymaps is .map.
-Thus, loadkeys uk would probably load
-/usr/lib/kbd/keytables/uk.map.
+For example, loadkeys uk would probably load
+/usr/lib/kbd/keymaps/i386/qwerty/uk.map.
+(With kbd-0.95 and older this would be /usr/lib/kbd/keytables
+and /usr/lib/kbd/keytables/uk.map.)
+
(On my machine) /dev/console is a symbolic link to /dev/tty0,
and the kernel regards /dev/tty0 as a synonym for the current VT.
@@ -1359,19 +1559,7 @@ Since version 1.3.33, the kernel knows about `sticky' modifier keys.
These act on the next key pressed. So, where one earlier needed
the 3-symbol sequence Shift_Lock a Shift_Lock to type `A', one
can now use the 2-symbol sequence SShift_Lock a.
-Versions of the kbd package older than 0.93 do not yet include code
-for these sticky modifiers, and have to invoke them
-using their hexadecimal codes. For example,
-
- % loadkeys
- keymaps 0-15
- keycode 54 = 0x0c00
- keycode 97 = 0x0c02
- keycode 100 = 0x0c03
- %
-
-will make the right Shift, Ctrl, Alt sticky versions of the left ones.
->From 0.93 on you can say
+You can say
% loadkeys
keymaps 0-15
@@ -1380,7 +1568,7 @@ will make the right Shift, Ctrl, Alt sticky versions of the left ones.
keycode 100 = SAlt
%
-to obtain the same result.
+to make the right Shift, Ctrl, Alt sticky versions of the left ones.
This will allow you to type Ctrl-Alt-Del in three keystrokes with one hand.
The keymaps line in these examples should cover all keymaps you have in use.
@@ -1389,6 +1577,37 @@ You find what keymaps you have in use by
% dumpkeys | head -1
+
+Sticky keys under
+The following text was contributed by Piotr Mitros.
+
+XFree86 supports an accessibility option which allows disabled users
+to type single-handed. With sticky keys enabled, the user can hit a
+modifier key (ctrl, alt, shift) followed by another key, rather than
+having to hold the modifier key while hitting the letter.
+
+To enable sticky keys, first make sure the xkb extension is enabled
+(this is done during initial /etc/X11/xdm/Xservers.
+
+It is also possible to enable /usr/X11R6/lib/X11/xkb/compat/accessx.
+Unfortunately, the exact process is still undocumented.
+
Changing the video mode
console!changing video modes
video modes, changing
@@ -1458,6 +1677,14 @@ that doesn't help, edit or remove the section
of /usr/src/linux/[arch/i386/]boot/setup.S.
+Scott Johnston (Scrolling
console!scrolling
scrolling, console
@@ -1526,7 +1753,7 @@ can be accessed using the device /dev/vcscat /dev/vcs
/dev/vcsCopyright
-Copyright (c) 1993-1998 by Andries Brouwer. This document may be
+Copyright (c) 1993-2001 by Andries Brouwer. This document may be
distributed under the terms set forth in the LDP license
-at or
+at or
.
@@ -1605,3 +1839,4 @@ Additions and corrections are welcome.
Andries Brouwer -
+