07.06.2014 Views

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

length. This allows encoding all Unicode characters on a sequence of one or<br />

more octets.<br />

Applications have slowly migrated, and use of UTF-8 is now wide spread. This<br />

was made easier by the fact that this encoding is the standard encoding for<br />

XML documents. Outside of specific circumstances, this is the encoding that<br />

should generally be used. It has become the default on new installations since<br />

Etch.<br />

The locales package includes all the elements required for proper functioning of “localization”<br />

for various applications. During installation, this package will ask a few questions in order to<br />

choose supported languages. This set of supported languages can be changed by running dpkgreconfigure<br />

locales.<br />

You will be asked, first, to choose what “locales” to include. Selecting all English locales (meaning<br />

those beginning with“en_US”) is a reasonable choice. Do not hesitate to choose other locales<br />

if the machine will host foreign users. This list of known locales on the system is stored<br />

in the /etc/locale.gen file. It is possible to edit this file by hand, but you should run localegen<br />

after any modifications. It will generate the necessary files for the proper functioning of<br />

added locales and remove any obsolete files.<br />

The second question, entitled “Set default locale”, requests a default locale. The recommended<br />

choice in the U.S.A. is “en_US.UTF-8”. British English speakers will prefer “en_GB.<br />

UTF-8”, and Canadians will prefer either en_CA.UTF-8” or, for French, “fr_CA.UTF-8”. The<br />

/etc/default/locale file will then be modified to set the default locale for the environment<br />

variable, LANG.<br />

BEHIND THE SCENES<br />

/etc/environment and /etc/<br />

default/locale<br />

The /etc/environment file provides the login, gdm, or even ssh programs with<br />

the correct environment variables to be created.<br />

These applications do not create these variables directly, but rather via a PAM<br />

(pam_env.so) module. PAM (Pluggable Authentication Module) is a modular<br />

library centralizing the mechanisms for authentication, session initialization,<br />

and password management. See Section 11.7.3.2, “Configuring PAM” (page<br />

292) for an example of PAM configuration.<br />

The /etc/default/locale file works in a similar manner, but does not contain<br />

the LANG environment variable. This means some PAM users will inherit<br />

an environment without localization. Running server programs with regional<br />

parameters is generally discouraged; on the other hand, using the implicit<br />

regional seings is recommended for programs that open user sessions.<br />

8.1.2. Configuring the Keyboard<br />

Until Debian Lenny, the keyboard layout was controlled by two different systems: for the console,<br />

console-tools/console-data; for graphical environments, keyboard-configuration. Since Squeeze,<br />

these two systems have been unified and keyboard-configuration controls the keyboard layout in<br />

both console and graphical mode. The dpkg-reconfigure keyboard-configuration command<br />

can be used at any time to reset the keyboard layout.<br />

Chapter 8 — Basic Configuration: Network, Accounts, Printing…<br />

145

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!