Re: kdm locale problem
On 13 Jun 2003 LeVA <email@example.com> wrote:
>> On 13 Jun 2003 Ben Kal wrote:
>>> On 11 Jun 2003 LeVA <firstname.lastname@example.org> wrote:
>>> In the kde control center, I can set up kdm to display the kdm buttons
>>> and messages (login, shutdown etc...) in hungarian. So that is ok. The
>>> problem is when I start kde from the kdm login manager, it seems, that
>>> kdm "resets" the localisations, and sets the lang to en, or en_US (or
>>> something like that). If I start a konsole from kde, and run this:
>>> echo $LANG
>>> I get "hu_HU".
>> Sounds like the locale for X sessions is not set to 'hu_HU', or probably not
>> set at all and therefore defaulting to 'C', while it is set to 'hu_HU' for
>> virtual consoles and shells in X terminals. This can easily happen because
>> the startup scripts that are run for shells and X sessions are not the same.
>> I am not using kdm and KDE but xdm and Gnome, and with that setup xdm calls
>> the user's .xsession script to start the X session, with the last line in
>> that script being a call to gnome-session to start Gnome. This means that
>> every user can set the locale for X sessions to his/her liking by inserting
>> the line
>> export LANG=<locale> LC_ALL=<locale>
>> into his/her .xsession before the call to gnome-session. I assume something
>> similar can be done when using kdm and KDE.
> I put the exports to my .Xsession and in kde I lose my hungarian "é" "á"
> ... letters. In the Desktop these letters replaced by a little white
> block, and in konsole I simply can not type those letters. If I press
> those, nothing happens, but for 'echo $LANG' I get "hu_HU", and every
> program uses the right hungarian transaltions.
> Any ideas why?
Yes, you now have to take the next two hurdles (the final ones, luckily):
- installation of fonts that support the Hungarian character set and
configuration of applications to use them;
- configuration of the keyboard for generating all the Hungarian special
The following are just hints to what to do; I advise you to read the HOWTO's
about installing support for the Euro sign. Although that is a slightly
different subject I expect you to find it very instructive because it points
to all the places in the system that one has to fiddle with to get full
support for one's funny national characters.
The Hungarian character set is ISO-8859-2, isn't it? So you need fonts with
support that character encoding.
For X11, such fonts are in the packages:
Just install the packages, and the fonts should be available to X11
programs, although some may need to be told to use them in a configuration
file or configuration utility of their own, for instance for xterm, edit
/etc/X11/app-defaults/XTerm (the *VT100*font lines)
For virtual consoles, the right fonts and character sets are in the package
Chances are you already have that installed. You will then find the fonts in
/usr/share/consolefonts/, the character sets in /usr/share/consoletrans/.
The fonts you will want are those with names starting with lat2, and the
character sets the ones with names starting with iso2.
The way to make the right combination of font and character set active on
virtual consoles is editing the file
The comments in the file itself more or less tell you what to do; if still
unsure, do: man consolechars; man charset.
No doubt there are more sources of fonts than the Debian packages mentioned,
but I myself do not yet really know my way in the world of fonts.
Finally, the keyboard layout (what characters are generated by what keys and
combinations of keys) must be such that there is a key or combination of
keys to generate every special character that some national character set
For X11, I *expect* that, in
you must enter
Option "XkbLayout" "hu"
but it could be that you will not like the effect at all. I myself do not
use "XkbLayout" "nl", because on an official true Dutch keyboard many
characters are under other keys than on an English keyboard; but once
I learned to touch type on an English keyboard, so on a Dutch keyboard
I constantly mistype!
Keyboard configuration in X11 is highly involved. The files that determine
it are in a directory tree under /etc/X11/xkb/. The "Keyboard" Section of
/etc/X11/XF86Config in effect tells the X server which of the files in
/etc/X11/xkb/ it must read on startup to set up the keyboard.
I believe that the options available for "XkbLayout" in the "Keyboard"
Section of /etc/X11/XF86Config correspond to the files in
/etc/X11/xkb/symbols/. If none of those makes you really happy, you could
make your own, by editing a copy of one of the existing ones ....
For virtual consoles, in
find a Hungarian keymap file; the prime candidate I see on my system is
Install a copy of the preferred keymap file as
and from then on /etc/init.d/keymap.sh will make your console keyboard
Hungarian on startup.
Again, as in X11, if none of the prefabricated official console keymaps is
really convenient, edit one to your liking ....
Good luck with your 'localisation project'
Anjelierstraat 1, 2014 TC Haarlem, Netherlands
tel +31 23 5324909, email@example.com