The Euro symbol on FreeBSD
Prev |  | Next

# 3 The console

## 3.1 Setting up your console font

Depending on your console resolution and size you will need one of the following lines in `rc.conf`:

    font8x16="iso15-8x16.fnt" # from /usr/share/syscons/fonts/*
    font8x14="iso15-8x14.fnt"
    font8x8="iso15-8x8.fnt"

This will effectively select the ISO8859-15 also known as Latin-9 font. ISO8859-15 is a variation of ISO8859-1. You can tell the difference between the two by looking at the Euro symbol: its decimal value is 164. In ISO8859-1 you will notice a circle with four little strokes at the corners. This is often termed the “universal currency symbol”. In ISO8859-15, instead of the little circle, you have the Euro Symbol. Otherwise the fonts are more or less identical.

> Warning: As of the time of this writing the only usable font seems to be `iso15-8x16.fnt`. The others seem to only show ISO8859-1 even though the name suggest otherwise.

> Note: By specifying this font some console applications will look garbled. This is due to the fact that they assume you are using a different font/character set such as ANSI 850. One notable example is sysinstall. However most of the time this should not be of much concern.

As the next step you should either reboot your system to let the changes take effect or (manually) take the steps that would have been taken at the system startup:

    % vidcontrol -f iso15-8x16.fnt

To check if the font has been selected execute the following short `awk` script:

    #!/usr/bin/awk -f
    BEGIN {
            for(i=160;i<180;i++)
                    printf"%3d %c\n",i,i
    }

The result should reveal the Euro sign at position 164.

## 3.2 Setting up your keyboard for the Euro

Most keyboard maps should already be set up correctly. I.e: If you have a german keyboard and your Umlaut keys are working, you can safely skip this section since the keyboard already maps whatever key combination is necessary (e.g.: Alt Gr+e) to decimal value 164. If running into problems, the best way to check is to take a look at `/usr/share/syscons/keymaps/*.kbd`. The format of the key mapping files is described in keyboard(4). kbdcontrol(1) can be used to load a custom keymap.

Once the correct keyboard map is selected, it should be added to `/etc/rc.conf` with the line:

    keymap="german.iso" # or another map

As stated above, this step has most probably already been taken by you at installation time (with sysinstall). If not, either reboot or load the new keymap via kbdcontrol(1).

To verify the keyboard mapping, switch to a new console and at the login prompt, instead of logging in, try to type the Euro key. If it is not working, either file a bug report via send-pr(1) or make sure you in fact chose the right keyboard map.

> Note: At this stage the Euro key will not yet work in bash or tcsh.

## 3.3 Fixing the environment variables

The shells (bash, tcsh) revert to the readline(3) library which in turn respects the `LC_CTYPE` environment variable. `LC_CTYPE` must be set before the shell is completely running. Luckily it suffices to add the line:

    export LC_CTYPE=de_DE.ISO8859-15

to your `.bash_profile` (bash), or:

    setenv LC_CTYPE de_DE.ISO8859-15

to your `.login` (tcsh) file. Of course, `de_DE` should be replaced by your language. Next, log out, log back in again, and verify your Euro key is working. By now most console applications should respond to the Euro key. Extra configuration steps for special programs like pine might still be necessary however.

> Note: An alternative to modifying `.login` and `.bash_profile` is to set the environment variables through the login.conf(5) mechanism. This approach has the advantage of assigning login classes to certain users (e.g. French users, Italian users, etc) in one place.

Prev | Home | Next
A general remark |  | Modifying X11

This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.

For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.