2

On freshly installed Ubuntu Core 16 for Raspberry Pi 3, calling locale prints:

LANG=C.UTF-8
LANGUAGE=
LC_CTYPE="C.UTF-8"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE="C.UTF-8"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="C.UTF-8"
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=

I'm assuming some of those values are set by ssh client.

How to generate new locale? I cannot find locale-gen and there is no locales package.

  • Have you tried putting export LANG=locale in your ~/.profile file, with the word locale being the locale you want to use? Usually changing just the lang is good enough. Also, have you looked into using the setlocale command? – Ken May 4 '17 at 5:00
  • I cannot find setlocale in PATH, a least non in the base image for raspberrypi. I can set the locales using env variables, but there only seem to be one possible value, that is C.UTF-8. – chrmod May 4 '17 at 21:58
2
+50

You can't. Ubuntu Core ships without locale support; /etc/default/locale in core is readonly, hardwired to C.UTF-8.

There exists a locale-control interface that is for use on classic, that is, it allows a snap to control the default locale of a classic system. It does not work on an ubuntu core system.

  • 1
    can you please reference any document that states that? I've found a plug called locale-control listed here - do you think it is related to locales or something else? – chrmod May 4 '17 at 21:56
  • @chrmod I've expanded my answer addressing locale-control and giving a bit more detail. – Chipaca May 5 '17 at 8:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.