Comment 13 for bug 2035044

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

> $ cat /etc/default/locale
> # File generated by update-locale
> LANG="en_US.UTF-8"
> LC_NUMERIC="en_CA.UTF-8"
> LC_TIME="en_CA.UTF-8"
> LC_MONETARY="en_CA.UTF-8"
> LC_PAPER="en_CA.UTF-8"
> LC_IDENTIFICATION="en_CA.UTF-8"
> LC_NAME="en_CA.UTF-8"
> LC_ADDRESS="en_CA.UTF-8"
> LC_TELEPHONE="en_CA.UTF-8"
> LC_MEASUREMENT="en_CA.UTF-8"
>
> $ locale
> LANG=en_US.UTF-8
> LANGUAGE=en_US
> LC_CTYPE="en_US.UTF-8"
> LC_NUMERIC=en_CA.UTF-8
> LC_TIME=en_CA.UTF-8
> LC_COLLATE="en_US.UTF-8"
> LC_MONETARY=en_CA.UTF-8
> LC_MESSAGES="en_US.UTF-8"
> LC_PAPER=en_CA.UTF-8
> LC_NAME=en_CA.UTF-8
> LC_ADDRESS=en_CA.UTF-8
> LC_TELEPHONE=en_CA.UTF-8
> LC_MEASUREMENT=en_CA.UTF-8
> LC_IDENTIFICATION=en_CA.UTF-8
> LC_ALL=
>
> $ locale | grep en_US | grep LC_
> LC_CTYPE="en_US.UTF-8"
> LC_COLLATE="en_US.UTF-8"
> LC_MESSAGES="en_US.UTF-8"
>
> The latter variables are not set to "en_CA.UTF-8"

That's true, and it's intended behavior. The idea is to distinguish between language and regional formats, and the latter variables are considered to be part of the language option.

> "Setting LC_ALL that way persistently on a desktop is a misconfiguration"?
>
> Is it?

Yes it is. If you want the same locale for every locale category, just make sure that you select the same locale for both language and regional formats.

LC_ALL is typically used by coders. It's not suitable as an environment variable on a desktop, since it makes any UI for this purpose useless.

If you want to make an exception for a particular locale category, e.g. LC_CTYPE or LC_TIME, then set that category separately. But leave LC_ALL unset.

> How does gnome-language-selector reload ~/.pam_environment ?

It doesn't. PAM loads ~/.pam_environment at login.