Contents of this section
All stuff needed for russification of the Linux console is contained
in the kbd package. The package is accessible at
tsx-11.mit.edu. Usually, that package is already installed (it is a
standard part of at least Slackware distribution).
To setup the Cyrillic stuff, one should do three things:
setfontprogram. The fonts files are placed in
/usr/lib/kbd/consolefonts. NOTE: Never run the
setfontprogram under X or it will hang your system. This is because it works with low-level video card calls which X doesn't like.
mapscrnprogram and the
The following is an example of a script which sets up the Cyrillic mode for console:
#!/bin/bash # # load cyrillic defs for console # # *** NEVER TRY IT UNDER X!!! *** loadkeys /usr/lib/kbd/keytables/ru.map setfont /usr/lib/kbd/consolefonts/Cyr_a8x16 mapscrn /usr/lib/kbd/consoletrans/koi2alt echo -ne 'ESC(K' # use the REAL ESCAPE character here ! echo "Use the right Ctrl key to switch the mode..."
Like the console mode, the X environment also requires some setup. This involves setting up the input mode and the X fonts. Both are being discussed below.
First of all, you have to obtain the fonts collection having the Cyrillic glyphs at the appropriate places.
There is a number of such fonts on the net. The author's favorite one
is the collection
VakuFonts created by Serge Vakulenko
firstname.lastname@example.org). It can be found in the collection of
cyrillic stuff for the X Window System
where you can find many
useful packages for X.
Usually the X fonts are distributed in the
BDF format which is
actually the textual font description. You should compile the fonts to
PCF format using the
bdftopcf -o name.pcf name.bdf
It is also possible to compress the compiled font using the
compress program (I am not sure about the
Now you should do three things to set everything up:
xinitrcfile (either local or global one):
xset +fp directory_with_fonts xset fp rehash
cdto it and run:
You should run it once. This will upgrade the the fonts catalog file
fonts.alias) then append it's contents to the fonts' aliases file in the directory containing the fonts.
After you have made the settings above, you can check the availability of the new fonts by running the following command:
xfd -fn fontname
This should show the table of characters of the specified font.
The switching between the different input translations is set up by
xmodmap program. This program allows customization of codes
emitted by various characters and their combinations. It sets the
things up based on the file containing the translation table, usually
~/.Xmodmap. If you want to create your own
table, refer to the
xmodmap(1). However such tables are generally
supplied with the various X Cyrillic stuff packages. The good example
is the tables in the perfect package by Serge Vakulenko described
Once you have such file containing the table, you should run the command:
every time you start X. Modify your
.xinitrc file to perform
it. NOTE: your
.xinitrc can already contain the code to run the
xmodmap over your local table if the one exists.
The table distributed with the Serge's Vakulenko package didn't work for the author. The following patch fixed the problem:
diff -u --new-file jcuken.xmm jcuken.xmm.mod --- jcuken.xmm Mon May 20 09:11:36 1991 +++ jcuken.xmm.mod Sun Aug 13 15:44:06 1995 @@ -2,6 +2,8 @@ ! Cyrillic keyboard mapping table. ! Produced by Serge Vakulenko,
, Moscow. ! +! Modified by Alexander L. Belikoff (email@example.com), 1995 +! ! Russian JCUKENG keyboard layout implemented. ! Cyrillic characters are entered in koi8 encoding. ! @@ -10,7 +12,9 @@ ! Use CapsLock as rus/lat switch key. remove lock = Caps_Lock -add mod2 = Caps_Lock +keysym Caps_Lock = Mode_switch +add mod2 = Mode_switch +add lock = Mode_switch ! Key Base Shift Caps ShiftCaps !------------------------------------------------------------------------
Now I can use the Caps Lock key to switch between normal and Cyrillic input modes.
The author would appreciate the version of the table to support the different mode switch key, say Alt or Control.
NOTE: The following is an excerpt from the list of new features
announced in the
Cyrillic fonts (using KIO8-R encoding) from Cronyx Ltd.
Unfortunately the author hasn't had a chance to check it yet.
Next Chapter, Previous Chapter
Table of contents of this chapter, General table of contents
Top of the document, Beginning of this Chapter