The Linux Danish/International HOWTO Thomas Petersen, petersen@risoe.dk v1.0, 9 March 1994 This document describes how to configure Linux and various Linux applications for use with the Danish characterset and keyboard. It is hoped that Linux users from other places in Western Europe will find this document of use too. 1. Introduction All European users of almost any operating system have two problems: The first is to tell the OS that you have a non-american keyboard, and the second is to get the OS to display the special letters. Under Linux you change the way your computer interprets the keyboard with the commands xmodmap and loadkeys. loadkeys will modify the keyboard for plain Linux while 'xmodmap' makes the modifications necessary when the handshaking between X and Linux is imperfect. To display the characters you need to tell your applications that you use the ISO-8859-Latin-1 international set of glyphs. Mostly this is not necessary, but a number of key applications need special attention. This Mini-Howto is intended to tell Danish users how to do this, but will hopefully be of help to many other people. If you continue to have troubles after reading this you should try the German HOWTO, the Keystroke HOWTO for Linux or the ISO 8859-1 FAQ. They have tips for many applications. Many of the hints contained herein are cribbed from there. The HOWTOs are available from all respectable mirrors of sunsite.unc.edu while the ISO 8859-1 FAQ is available from ftp.vlsivie.tuwien.ac.at in /pub/8bit/FAQ-ISO-8859-1. 2. Keyboard setup 2.1. Loading a Danish keytable Keyboard mappings are in /usr/lib/kbd/keytables/. Try typing either of these two commands to load one /usr/bin/loadkeys /usr/lib/kbd/keytables/dk.map /usr/bin/loadkeys /usr/lib/kbd/keytables/dk-lat1.map The difference between the two lines is that dk-lat1.map uses `dead' keys while dk.map doesn't. Dead keys are explained in section ``Dead- Keys''. You can change the keymapping loaded at boot by editing the file /etc/rc.d/rc.keymap. If this doesn't work you simply haven't installed support for international keyboards. 2.2. Getting the AltGr key to work under X Edit the file /etc/Xconfig (under XFree86 2.0) or /etc/X11/XF86Config (underXFree86 3.x) and make sure the line RightAlt ModeShift appears in the Keyboard section. Usually you can do this by uncomment- ing an appropriate line. 2.3. Dead keys and accented characters Dead keys are those who don't type anything until you hit another key. Tildes and umlauts are like this by default under Microsoft Windows and if you use the dk-lat1.map keymap under Linux. 2.3.1. Removing dead key functionality Under plain Linux type loadkeys dk.map 2.3.2. Invoking dead key functionality o Invoking dead key functionality under plain Linux Under plain Linux type loadkeys dk-lat1.map o Invoking dead key functionality under X11R5 sessions Insert the following lines in a file ~/.Xmodmap or /etc/X11/Xmodmap keycode 21 = acute Dgrave_accent bar keycode 35 = Ddiaeresis Dcircumflex_accent Dtilde You can now make the dead keys work by typing (e.g.) xmodmap .Xmodmap. Using the Slackware distribution this commando will be auto- matically executed next time you run X. o Invoking dead key functionality under X11R6 sessions Under X11R6 applications dead keys won't work unless they were compiled with support for unusual input methods. The only application reported to do so is kterm - an xterm substitute. Eventually the situation might improve, but as it is you can't do much but revert to X11R5 or hack every application you own. Do not attempt the method described for X11R5. 2.4. Making o (oslash) O (Ooblique) and the dollar sign work 2.4.1. o (oslash) and O (Ooblique) Find out what keymap you load at boot-up. You should be able to find out by typing less /etc/rc.d/rc.keymap. On my computer it is called /usr/lib/kbd/keytables/dk-lat1.map. Find the line for keycode 40 in this file and change it from keycode 40 = cent yen to keycode 40 = oslash Ooblique and load the keytable as described in section ``LoadKeys''. Note: This bug appears to have been fixed in version 0.88 of the international keytable package. 2.4.2. Dollar sign The dollar sign is accessed with Shift-4 instead of AltGr-4 by default. You can fix this by changing the line keycode 5 = four dollar dollar in the keymap file to e.g. keycode 5 = four asciicircum dollar It doesn't matter if you something else instead asciicircum if it is just a valid symbol name. See section ``Glyphs'' for a list of valid symbols. 3. Display and application setup 3.1. International character sets in specific applications A number of applications demand special attention. This section descibes how to set up configuration filesfor them. o bash v.1.13+ : Put the following in your .inputrc file set meta-flag on set convert-meta off set output-meta on o tcsh: Put the following in your /etc/csh.login or .tcshrc file setenv LC_CTYPE ISO-8859-1 stty pass8 o less: Set the following environment variable LESSCHARSET=latin1 o elm: Set the following environment variables LANG=C LC_CTYPE=ISO-8859-1 o emacs: Put the following in your .emacs or the /usr/lib/emacs/site- lisp/default.el file: (standard-display-european t) (set-input-mode (car (current-input-mode)) (nth 1 (current-input-mode)) 0) o TeX / LaTeX: Cribbed from the ISO 8859-1 FAQ by Michael Gschwind : In LaTeX 2.09, use \documentstyle[isolatin]{article} to include support for ISO latin1 characters. In LaTeX2e, the commands \documentclass{article} \usepackage{isolatin} will do the job. isolatin.sty is available from all CTAN servers and from URL ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit. 3.2. What characters you can display under Linux Type dumpkeys -l | less at the prompt to find out what is readily available. You can map them to your keyboard via the keymap files mentioned in section ``LoadKeys''. X11R5 Note: The dead keys don't get the correct names under X11R5 with this scheme. Generally dead_* (under plain Linux) => D* or D*_accent (under X11R5) (i.e. the tilde may be dead_tilde in dk-lat1.map but X11R5 expects the dead tilde to be called Dtilde.) This does not apply to X11R6. 3.3. Loading the Latin-1 characer set on the console Execute the following commands under the bash shell: setfont /usr/lib/kbd/consolefonts/lat1-16.psf mapscrn /usr/lib/kbd/consoletrans/trivial echo -ne '\033(K' Note: This only has effect under plain Linux. Do not try it under X. 4. Post-amble: Acknowledgements and Copyright Thanks to Peter Dalgaard, Anders Majland, the authors of the German Howto and Michael Gschwind for help with several questions. This Mini-Howto is copyrighted by Thomas Petersen and distributed as other Linux HOWTOs under the terms described below. Linux HOWTO documents may be reproduced and distributed in whole or in part, in any medium physical or electronic, as long as this copyright notice is retained on all copies. Commercial redistribution is allowed and encouraged; however, the author would like to be notified of any such distributions. All translations, derivative works, or aggregate works incorporating any Linux HOWTO documents must be covered under this copyright notice. That is, you may not produce a derivative work from a HOWTO and impose additional restrictions on its distribution. Exceptions to these rules may be granted under certain conditions; please contact the Linux HOWTO coordinator at the address given below. If you have questions, please contact Greg Hankins, the Linux HOWTO coordinator, at gregh@sunsite.unc.edu. You may finger this address for phone number and additional contact information.