With the recent LC_ALL thread, I noticed I have LC_TIME set by
mysterious means on at least two headless systems, for example:
$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE=en_US.utf8
LC_NUMERIC=en_US.utf8
LC_TIME=en_DK.utf8
LC_COLLATE=en_US.utf8
LC_MONETARY=en_US.utf8
LC_MESSAGES=en_US.utf8
LC_PAPER=en_US.utf8
LC_NAME=en_US.utf8
LC_ADDRESS=en_US.utf8
LC_TELEPHONE=en_US.utf8
LC_MEASUREMENT=en_US.utf8
LC_IDENTIFICATION=en_US.utf8
LC_ALL=
LC_TIME ends up with en_DK.utf8. It's what I usually want so I've
probably set this up and possibly I did it in the Debian installer but
where does it come from? /etc/default/locale has just LANG=en_US.UTF-8
find /etc /home/as -type f -print0 -follow|xargs -0 grep -e LC_TIME -e en_DK
does find some matches, in /etc/locale.gen as expected and in some
binary files but not in any relevant config file. Come to think of it,
is this actually hidden inside the initrd somehow?
On Fri, Feb 16, 2024 at 10:24:07AM +0200, Anssi Saari wrote:
With the recent LC_ALL thread, I noticed I have LC_TIME set by
mysterious means on at least two headless systems, for example:
$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE=en_US.utf8
LC_NUMERIC=en_US.utf8
LC_TIME=en_DK.utf8
LC_COLLATE=en_US.utf8
LC_MONETARY=en_US.utf8
LC_MESSAGES=en_US.utf8
LC_PAPER=en_US.utf8
LC_NAME=en_US.utf8
LC_ADDRESS=en_US.utf8
LC_TELEPHONE=en_US.utf8
LC_MEASUREMENT=en_US.utf8
LC_IDENTIFICATION=en_US.utf8
LC_ALL=
This is *extremely* abnormal locale output. Here's mine:
Yah. It was ssh passing through all that. On serial console, locale[...]
settings are as expected:
$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
On Fri, Feb 16, 2024 at 03:34:12PM +0200, Anssi Saari wrote:
Yah. It was ssh passing through all that. On serial console, locale settings are as expected:
$ locale[...]
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
Well then, that just changes the mystery from "happens on the Debian
system I ssh into" to "happens on my ssh client". For some reason,
your ssh client has all of those LC_* variables set in its environment,
which is still quite unusual.
On Fri 16 Feb 2024 at 09:12:24 (-0500), Greg Wooledge wrote:
On Fri, Feb 16, 2024 at 03:34:12PM +0200, Anssi Saari wrote:
Yah. It was ssh passing through all that. On serial console, locale settings are as expected:
$ locale[...]
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
Well then, that just changes the mystery from "happens on the Debian
system I ssh into" to "happens on my ssh client". For some reason,
your ssh client has all of those LC_* variables set in its environment, which is still quite unusual.
Could something weird here do that?
$ grep LC /etc/ssh/*g
/etc/ssh/ssh_config: SendEnv LANG LC_*
/etc/ssh/sshd_config:AcceptEnv LANG LC_*
$
On Fri, Feb 16, 2024 at 11:11:09AM -0600, David Wright wrote:
On Fri 16 Feb 2024 at 09:12:24 (-0500), Greg Wooledge wrote:
On Fri, Feb 16, 2024 at 03:34:12PM +0200, Anssi Saari wrote:
Yah. It was ssh passing through all that. On serial console, locale settings are as expected:
$ locale[...]
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
Well then, that just changes the mystery from "happens on the Debian system I ssh into" to "happens on my ssh client". For some reason,
your ssh client has all of those LC_* variables set in its environment, which is still quite unusual.
Could something weird here do that?
$ grep LC /etc/ssh/*g
/etc/ssh/ssh_config: SendEnv LANG LC_*
/etc/ssh/sshd_config:AcceptEnv LANG LC_*
$
That's all normal and expected.
What's odd is that client *actually has* LC_NUMERIC and so on set in
its environment. Which... is not a problem if they're all set to the
correct values. It's weird, but not wrong. The problem for the OP was
that one of the values was not set correctly, or at least not as
expected.
At this point we have no idea whether the ssh client is even a Unix/Linux system. It could be anything. It could be a literal toaster.
On Fri 16 Feb 2024 at 16:25:05 (-0500), Greg Wooledge wrote:
At this point we have no idea whether the ssh client is even a Unix/Linux system. It could be anything. It could be a literal toaster.
More likely an æbleskiver pan?
On Fri, Feb 16, 2024 at 03:34:12PM +0200, Anssi Saari wrote:
Yah. It was ssh passing through all that. On serial console, locale[...]
settings are as expected:
$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
Well then, that just changes the mystery from "happens on the Debian
system I ssh into" to "happens on my ssh client". For some reason,
your ssh client has all of those LC_* variables set in its environment,
which is still quite unusual.
That's all normal and expected.
What's odd is that client *actually has* LC_NUMERIC and so on set in
its environment. Which... is not a problem if they're all set to the
correct values. It's weird, but not wrong. The problem for the OP
was that one of the values was not set correctly, or at least not as expected.
Greg Wooledge <greg@wooledge.org> wrote:
That's all normal and expected.
What's odd is that client *actually has* LC_NUMERIC and so on set in
its environment. Which... is not a problem if they're all set to the correct values. It's weird, but not wrong. The problem for the OP
was that one of the values was not set correctly, or at least not as expected.
It's not weird at all. It's how many people set their machines, when
they have logical minds and prefer YYYY-MM-DD date format rather than
the illogical messes most countries have in their locales.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 46:58:15 |
Calls: | 6,910 |
Files: | 12,379 |
Messages: | 5,429,529 |