Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #267510

Re: What sets LC_TIME?

From David Wright <deblis@lionunicorn.co.uk>
Newsgroups linux.debian.user
Subject Re: What sets LC_TIME?
Date 2024-02-17 00:20 +0100
Message-ID <I8fES-aDhf-1@gated-at.bofh.it> (permalink)
References (1 earlier) <I85vP-ax4I-5@gated-at.bofh.it> <I86Bz-axFK-7@gated-at.bofh.it> <I87eh-ay7E-7@gated-at.bofh.it> <I8a2t-azQr-1@gated-at.bofh.it> <I8dWp-aCbu-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri 16 Feb 2024 at 16:25:05 (-0500), Greg Wooledge wrote:
> 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.

Yes, they're off my system :) though I should have added -r to
catch any ssh_config.d/* files, as in the illustration below.

> 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.

That's why I posted the last line about SetEnv, illustrated by:

  $ cat /etc/ssh/ssh_config.d/test.conf 
  Host ahost
    SetEnv LC_PAPER=en_GB.utf8
  #
  $ ssh ahost
  Linux ahost 5.10.0-27-amd64 #1 SMP Debian 5.10.205-2 (2023-12-31) x86_64

  The programs included with the Debian GNU/Linux system are free software;
  [ … ]
  You have new mail.
  Last login: Fri Feb 16 22:41:18 2024 from 192.168.1.14
  $ locale
  LANG=C.UTF-8
  LANGUAGE=
  LC_CTYPE=en_GB.UTF-8
  LC_NUMERIC="C.UTF-8"
  LC_TIME="C.UTF-8"
  LC_COLLATE="C.UTF-8"
  LC_MONETARY="C.UTF-8"
  LC_MESSAGES="C.UTF-8"
  LC_PAPER=en_GB.utf8        ←
  LC_NAME="C.UTF-8"
  LC_ADDRESS="C.UTF-8"
  LC_TELEPHONE="C.UTF-8"
  LC_MEASUREMENT="C.UTF-8"
  LC_IDENTIFICATION="C.UTF-8"
  LC_ALL=
  $ 

It's not a place I'd have immediately thought of looking.

> 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?

Cheers,
David.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

What sets LC_TIME? Anssi Saari <anssi.saari@debian-user.mail.kapsi.fi> - 2024-02-16 09:30 +0100
  Re: What sets LC_TIME? Greg Wooledge <greg@wooledge.org> - 2024-02-16 13:30 +0100
    Re: What sets LC_TIME? Anssi Saari <anssi.saari@debian-user.mail.kapsi.fi> - 2024-02-16 14:40 +0100
      Re: What sets LC_TIME? Greg Wooledge <greg@wooledge.org> - 2024-02-16 15:20 +0100
        Re: What sets LC_TIME? David Wright <deblis@lionunicorn.co.uk> - 2024-02-16 18:20 +0100
          Re: What sets LC_TIME? Greg Wooledge <greg@wooledge.org> - 2024-02-16 22:30 +0100
            Re: What sets LC_TIME? David Wright <deblis@lionunicorn.co.uk> - 2024-02-17 00:20 +0100
              Re: What sets LC_TIME? <tomas@tuxteam.de> - 2024-02-17 07:00 +0100
            Re: What sets LC_TIME? debian-user@howorth.org.uk - 2024-02-17 21:20 +0100
              Re: What sets LC_TIME? Greg Wooledge <greg@wooledge.org> - 2024-02-17 21:30 +0100
        Re: What sets LC_TIME? Anssi Saari <anssi.saari@debian-user.mail.kapsi.fi> - 2024-02-17 08:00 +0100

csiph-web