HOW TO MAKE LINUX INTO A PROPERLY NORWEGIAN SYSTEM All comments, extensions and so on: Harald.T.Alvestrand@uninett.no (This document is written in ENGLISH, to make it available to people working on other nationalization projects. Ole J. Utnes has written a Norwegian, HTMLized guide; this is available at http://abel.hsv.no/linux/norsk/norsk.html) (NOTE: This document is rather old. Last major changes in February of 1995 and July of 1997. Some still find it useful, though.) 1) GET THE CHARACTER SET You have a good start: Linux internally uses the ISO 8859-1 character set. (There is also support for UTF-8 in later kernels, 1.3.something I think, but this is NOT on by default) The IBM character set misses the character Ø (Oslash). Currently, Linux compromises by using the Greek Phi character. The following magic will repair this on a standard Slackware 2.1.0 installation: setfont /usr/lib/kbd/consolefonts/lat1u-16.psf (the font used depends on your font size) Now, ÆØÅ will be displayed as graphics or e with grave accent. To get the computer to stop translating from the internal ISO 8859-1 character set to the PC character set, you need to output an escape sequence to the screen: ESC ( K Type: echo '^[(K' where the ^[ is an ESC (input it as Control-V ESC in most shells) The quotes are required. (Apparently this is no longer required in Linux 1.3 kernels, according to Jørn Lokøy, . I don't know when it changed) Strangely, the "mapscrn" utility seems not to be required; if you need it, the format for translations can be seen in /usr/lib/kbd/consoletrans. Now, the Ø should be displayed properly. New versions of these tools are released with the Linux kernel, in the "kbd" package. The last one, on which this is based, is kbd-0.87. The translations are valid for all virtual consoles, but the escape sequence seems to be per console; I don't like that.... 2) GETTING THE KEYBOARD RIGHT The Slackware install scripts do a good job of allowing you to select the proper keyboard. The command required is found in /etc/rc.d/rc.keymap: /usr/bin/loadkeys /usr/lib/kbd/keytables/no-lt1+.map Modify according to taste. (rc.keymap is invoked from rc.local; you will have to modify this according to the style of init scripts you use) 3) GETTING APPLICATIONS TO WORK PROPERLY Most of this is culled from the kbd FAQ....this version is for users of TCSH; I haven't found out how to get it into std init yet.... To get LESS to display chars correctly: setenv LESSCHARSET latin1 This gets LESS to do the Right Thing. setenv LESS f (+ additional options) is also recommended by the kbd FAQ; this suppresses the occasional warning that "xyzzy may be a binary file". To get ls to display all characters of filenames: alas ls ls -FN this seems not to be required with my ls? To get the tcsh to accept 8-bit input: setenv LC_CTYPE iso-8859-1 (the value is actually not important; setting it to "green potatoes" will give the same effect. NOTE that this will change once you have a TCSH that attempts to do *real* NLS support) To get MH to accept that MIME messages in iso-8859-1 are directly displayable: setenv MM_CHARSET iso-8859-1 To get EMACS to believe that it should display and accept Norwegian characters directly, put the following into your .emacs: (standard-display-european t) (set-input-mode (car (current-input-mode)) (nth 1 (current-input-mode)) 0) (according to the kbd FAQ, the last one may be replaced with (set-input-mode nil nil 1), but this version may be less damaging to other people's extensions; I found it in the Emacs info system) To get BASH (actually the readline library) to accept 8-bit input: Create a file called .inputrc in your home directory containing set convert-meta off set meta-flag on and BASH will do its thing correctly. (Source: BASH man page, dated August 9, 1993) For BASH versions after 1.14, you also need to specify set output-meta off to avoid having the Norwegian chars represented as backslash-digits, according to ssb@pvv.unit.no (Stig Sæther Bakken). According to Jon Haugsand , the following command in /etc/profile should also be included: export LC_CTYPE=iso-8859-1 This will cause an error message in bash 1.14.3, again according to ssb. According to J|rn Lok|y , the following programs need special options: minicom should be started with -l joe should have -asis in .joerc 4) GETTING X TO WORK RIGHT X basically works fine with ISO 8859-1, provided you use fonts that have the full character set. Generally, most fonts whose names end with "-iso8859-1" are correct ISO 8859-1 fonts, and so are most of the "short name" fonts like "8x13" (which are most often aliases for a "long name" font). In XFree86 versions later than 3.1.2, the XKEYBOARD extension has been added. You must either explicitly tell it what keyboard you have, or disable it with the keyword "XkbDisable". When it's disabled, it will ask the console for the key bindings. The default is disabled, I think. In early releases, people have reported having to do explicit setting to get the right ALT key (AltGr) to function properly to invoke the "strange characters" like the @ sign. This is the last 4 lines of the example modmap file below. If it is still not right, there are a number of ways to correct it. For instance, you can run "xmodmap keymap.no" with the following content of the file "keymap.no": ------------------- keycode 11 = 2 quotedbl at keycode 12 = 3 numbersign sterling keycode 13 = 4 dollar dollar currency keycode 16 = 7 slash braceleft keycode 17 = 8 parenleft bracketleft keycode 18 = 9 parenright bracketright keycode 19 = 0 equal braceright keycode 21 = backslash grave acute keycode 34 = aring Aring bracketright braceright keycode 47 = oslash Ooblique backslash bar keycode 48 = ae AE bracketleft braceleft keycode 94 = less greater guillemotleft guillemotright keycode 113 = Mode_switch clear Mod1 add Mod1 = Alt_L clear Mod2 add Mod2 = Mode_switch -------------------- This modmap file was supplied by Harald Eikrem Alternatively, you can use the XF86Config file, which is specific to XFree86 3.1 or later: LeftAlt Meta RightAlt ModeShift RightCtl Compose ScrollLock Modelock This was supplied by Steinar.Gravdal@nit.no on advice from Stig.Bakken@pvv.unit.no