mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] ptxdist locale problems
@ 2016-01-30 18:03 Clemens Gruber
  2016-02-01 15:36 ` Michael Olbrich
  0 siblings, 1 reply; 5+ messages in thread
From: Clemens Gruber @ 2016-01-30 18:03 UTC (permalink / raw)
  To: ptxdist

Hi,

I am running a ptxdist 2016.01.0 ARM-based system with 4.4 kernel,
glibc, systemd and the following ptxdist locale settings:
PTXCONF_LOCALES=y
PTXCONF_LOCALES_EN_US_UTF8=y
PTXCONF_SYSTEMD_LOCALES=y

locale -a shows:
C
POSIX
en_US.utf8

But localectl from systemd does not show anything:
System Locale: n/a

Also, even if I add a LANG=en_US.utf8 or LANG=en_US.UTF-8 manually to
/etc/locale.conf, POSIX remains the default locale.

I want to replace the POSIX default with en_US.utf8 systemwide, what are
the necessary steps on a ptxdist system?

Thanks.
Clemens

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] ptxdist locale problems
  2016-01-30 18:03 [ptxdist] ptxdist locale problems Clemens Gruber
@ 2016-02-01 15:36 ` Michael Olbrich
  2016-02-02 19:24   ` Clemens Gruber
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Olbrich @ 2016-02-01 15:36 UTC (permalink / raw)
  To: ptxdist

On Sat, Jan 30, 2016 at 07:03:22PM +0100, Clemens Gruber wrote:
> Hi,
> 
> I am running a ptxdist 2016.01.0 ARM-based system with 4.4 kernel,
> glibc, systemd and the following ptxdist locale settings:
> PTXCONF_LOCALES=y
> PTXCONF_LOCALES_EN_US_UTF8=y
> PTXCONF_SYSTEMD_LOCALES=y
> 
> locale -a shows:
> C
> POSIX
> en_US.utf8
> 
> But localectl from systemd does not show anything:
> System Locale: n/a

With a corresponding /etc/locale.conf I see
System Locale: LANG=en_US.utf8

> Also, even if I add a LANG=en_US.utf8 or LANG=en_US.UTF-8 manually to
> /etc/locale.conf, POSIX remains the default locale.
> 
> I want to replace the POSIX default with en_US.utf8 systemwide, what are
> the necessary steps on a ptxdist system?

What does "localectl list-locales" tell you?

Michael


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] ptxdist locale problems
  2016-02-01 15:36 ` Michael Olbrich
@ 2016-02-02 19:24   ` Clemens Gruber
  2016-02-02 19:27     ` Clemens Gruber
  0 siblings, 1 reply; 5+ messages in thread
From: Clemens Gruber @ 2016-02-02 19:24 UTC (permalink / raw)
  To: ptxdist; +Cc: Michael Olbrich

On Mon, Feb 01, 2016 at 04:36:39PM +0100, Michael Olbrich wrote:
> With a corresponding /etc/locale.conf I see
> System Locale: LANG=en_US.utf8

Hm, now localectl does show the following:
System Locale: LANG=en_US.utf8

But, the "locale" program still shows:
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

> What does "localectl list-locales" tell you?

It shows: en_US.utf8

So ptxdist did generate the locale files correctly, but the
/etc/locale.conf entry does not seem to have any effect on the output of
"locale". Is this expected and what can I do about it?
Shouldn't systemd-localed also set the environment variables?

Michael, does your machine show LANG=en_US.utf8 in the output of the
"locale" command?

Thanks for your help.
Clemens

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] ptxdist locale problems
  2016-02-02 19:24   ` Clemens Gruber
@ 2016-02-02 19:27     ` Clemens Gruber
  2016-02-11  7:52       ` Michael Olbrich
  0 siblings, 1 reply; 5+ messages in thread
From: Clemens Gruber @ 2016-02-02 19:27 UTC (permalink / raw)
  To: ptxdist; +Cc: Michael Olbrich

On Tue, Feb 02, 2016 at 08:24:12PM +0100, Clemens Gruber wrote:
> On Mon, Feb 01, 2016 at 04:36:39PM +0100, Michael Olbrich wrote:
> > With a corresponding /etc/locale.conf I see
> > System Locale: LANG=en_US.utf8
> 
> Hm, now localectl does show the following:
> System Locale: LANG=en_US.utf8
> 
> But, the "locale" program still shows:
> LANG=
> LC_CTYPE="POSIX"
> LC_NUMERIC="POSIX"
> LC_TIME="POSIX"
> LC_COLLATE="POSIX"
> LC_MONETARY="POSIX"
> LC_MESSAGES="POSIX"
> LC_PAPER="POSIX"
> LC_NAME="POSIX"
> LC_ADDRESS="POSIX"
> LC_TELEPHONE="POSIX"
> LC_MEASUREMENT="POSIX"
> LC_IDENTIFICATION="POSIX"
> LC_ALL=
> 
> > What does "localectl list-locales" tell you?
> 
> It shows: en_US.utf8
> 
> So ptxdist did generate the locale files correctly, but the
> /etc/locale.conf entry does not seem to have any effect on the output of
> "locale". Is this expected and what can I do about it?
> Shouldn't systemd-localed also set the environment variables?
> 
> Michael, does your machine show LANG=en_US.utf8 in the output of the
> "locale" command?
> 
> Thanks for your help.
> Clemens

If I try to connect to the machine with mosh, I get:
"The locale requested by LC_CTYPE=en_US.utf8 isn't available here.
Running `locale-gen en_US.utf8' may be necessary.

mosh-server needs a UTF-8 native locale to run."

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ptxdist] ptxdist locale problems
  2016-02-02 19:27     ` Clemens Gruber
@ 2016-02-11  7:52       ` Michael Olbrich
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Olbrich @ 2016-02-11  7:52 UTC (permalink / raw)
  To: ptxdist

On Tue, Feb 02, 2016 at 08:27:14PM +0100, Clemens Gruber wrote:
> On Tue, Feb 02, 2016 at 08:24:12PM +0100, Clemens Gruber wrote:
> > On Mon, Feb 01, 2016 at 04:36:39PM +0100, Michael Olbrich wrote:
> > > With a corresponding /etc/locale.conf I see
> > > System Locale: LANG=en_US.utf8
> > 
> > Hm, now localectl does show the following:
> > System Locale: LANG=en_US.utf8
> > 
> > But, the "locale" program still shows:
> > LANG=
> > LC_CTYPE="POSIX"
> > LC_NUMERIC="POSIX"
> > LC_TIME="POSIX"
> > LC_COLLATE="POSIX"
> > LC_MONETARY="POSIX"
> > LC_MESSAGES="POSIX"
> > LC_PAPER="POSIX"
> > LC_NAME="POSIX"
> > LC_ADDRESS="POSIX"
> > LC_TELEPHONE="POSIX"
> > LC_MEASUREMENT="POSIX"
> > LC_IDENTIFICATION="POSIX"
> > LC_ALL=
> > 
> > > What does "localectl list-locales" tell you?
> > 
> > It shows: en_US.utf8
> > 
> > So ptxdist did generate the locale files correctly, but the
> > /etc/locale.conf entry does not seem to have any effect on the output of
> > "locale". Is this expected and what can I do about it?
> > Shouldn't systemd-localed also set the environment variables?
> > 
> > Michael, does your machine show LANG=en_US.utf8 in the output of the
> > "locale" command?
> > 
> > Thanks for your help.
> > Clemens
> 
> If I try to connect to the machine with mosh, I get:
> "The locale requested by LC_CTYPE=en_US.utf8 isn't available here.
> Running `locale-gen en_US.utf8' may be necessary.
> 
> mosh-server needs a UTF-8 native locale to run."

"systemctl show-environment" contains the correct 'LANG'. However, LANG is
not set in the shell. Maybe we should add something like this to
/etc/profile.d/systemdd.sh:

if [ -s /etc/locale.conf ]; then
	. /etc/locale.conf
	export LANG
fi

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-11  7:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-30 18:03 [ptxdist] ptxdist locale problems Clemens Gruber
2016-02-01 15:36 ` Michael Olbrich
2016-02-02 19:24   ` Clemens Gruber
2016-02-02 19:27     ` Clemens Gruber
2016-02-11  7:52       ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox