View previous topic :: View next topic |
Author |
Message |
hedmo Veteran
Joined: 29 Aug 2009 Posts: 1305 Location: sweden
|
Posted: Fri Nov 02, 2018 6:29 am Post subject: can not get locale to stick (solved) |
|
|
hi all
i can not the locale change to stick.it always go back to :
Code: |
hedmo@mybox ~ $ locale
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=sma_SE.UTF-8
LC_CTYPE=en_US.UTF-8
LC_NUMERIC="sma_SE.UTF-8"
LC_TIME="sma_SE.UTF-8"
LC_COLLATE="sma_SE.UTF-8"
LC_MONETARY="sma_SE.UTF-8"
LC_MESSAGES="sma_SE.UTF-8"
LC_PAPER="sma_SE.UTF-8"
LC_NAME="sma_SE.UTF-8"
LC_ADDRESS="sma_SE.UTF-8"
LC_TELEPHONE="sma_SE.UTF-8"
LC_MEASUREMENT="sma_SE.UTF-8"
LC_IDENTIFICATION="sma_SE.UTF-8"
LC_ALL=
hedmo@mybox ~ $
|
and i want it to be:
Code: |
mybox /home/hedmo # export LANG=en_US.UTF-8
mybox /home/hedmo # locale
LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
mybox /home/hedmo #
|
regards hedmo
Last edited by hedmo on Fri Dec 07, 2018 7:41 am; edited 1 time in total |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30822 Location: here
|
Posted: Fri Nov 02, 2018 6:57 am Post subject: |
|
|
sma_SE seems not a supported locale.
Code: | # locale-gen
* Generating 14 locales (this might take a while) with 12 jobs
* (11/14) Generating sma_SE.UTF-8 ...
failed to set locale!
[error] cannot open locale definition file `sma_SE': No such file or directory
.... |
List of supported locale can be found in /usr/share/i18n/locales/ _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
hedmo Veteran
Joined: 29 Aug 2009 Posts: 1305 Location: sweden
|
Posted: Fri Nov 02, 2018 7:05 am Post subject: |
|
|
fedeliallalinea wrote: | sma_SE seems not a supported locale.
Code: | # locale-gen
* Generating 14 locales (this might take a while) with 12 jobs
* (11/14) Generating sma_SE.UTF-8 ...
failed to set locale!
[error] cannot open locale definition file `sma_SE': No such file or directory
.... |
List of supported locale can be found in /usr/share/i18n/locales/ |
hi fedeliallalinea
i know and i dont have it in /etc/locale.gen
Code: |
mybox /home/hedmo # cat /etc/locale.gen
# /etc/locale.gen: list all of the locales you want to have on your system.
# See the locale.gen(5) man page for more details.
#
# The format of each line:
# <locale name> <charset>
#
# Where <locale name> starts with a name as found in /usr/share/i18n/locales/.
# It must be unique in the file as it is used as the key to locale variables.
# For non-default encodings, the <charset> is typically appended.
#
# Where <charset> is a charset located in /usr/share/i18n/charmaps/ (sans any
# suffix like ".gz").
#
# All blank lines and lines starting with # are ignored.
#
# For the default list of supported combinations, see the file:
# /usr/share/i18n/SUPPORTED
#
# Whenever glibc is emerged, the locales listed here will be automatically
# rebuilt for you. After updating this file, you can simply run `locale-gen`
# yourself instead of re-emerging glibc.
en_US ISO-8859-1
en_US.UTF-8 UTF-8
#ja_JP.EUC-JP EUC-JP
#ja_JP.UTF-8 UTF-8
#ja_JP EUC-JP
#en_HK ISO-8859-1
#en_PH ISO-8859-1
#de_DE ISO-8859-1
#de_DE@euro ISO-8859-15
#es_MX ISO-8859-1
#fa_IR UTF-8
#fr_FR ISO-8859-1
#fr_FR@euro ISO-8859-15
#it_IT ISO-8859-1
mybox /home/hedmo #
|
and i can not find a file where "sma_SE.UTF-8" is maked.
regards |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Fri Nov 02, 2018 7:35 am Post subject: |
|
|
Are you using KDE by any chance? If you are, check the contents of ~/.config/plasma-localerc and change if incorrect. _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
hedmo Veteran
Joined: 29 Aug 2009 Posts: 1305 Location: sweden
|
Posted: Thu Dec 06, 2018 12:23 pm Post subject: |
|
|
Fitzcarraldo wrote: | Are you using KDE by any chance? If you are, check the contents of ~/.config/plasma-localerc and change if incorrect. |
Fitzcarraldo
i have set en_US.UTF-8 in plasma-localerc to but after i reboot,i get : LANG=sma_SE.UTF-8 again
regards hedmo |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3919 Location: Hamburg
|
Posted: Thu Dec 06, 2018 12:36 pm Post subject: |
|
|
Try to find the file where LANG is set, eg. sth. like this should work Code: | grep -Hr sma_SE.UTF-8 ~/ |
|
|
Back to top |
|
|
Blind_Sniper Guru
Joined: 20 Apr 2018 Posts: 336
|
Posted: Thu Dec 06, 2018 6:40 pm Post subject: |
|
|
I had the same issue for root user when working in terminal. I tried to find where it come from by using grep on entire the root filesystem, but grep found nothing. Eventually I fixed it by creating /root/.bashrc file with this content:
Code: | export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8 |
This file overrides erroneous locale "on the fly" and have a higher priority.
Added:
It doesn't redefine locale, and locale command still shows incorrect locale, but I got rid of error message when working in terminal |
|
Back to top |
|
|
Fitzcarraldo Advocate
Joined: 30 Aug 2008 Posts: 2034 Location: United Kingdom
|
Posted: Fri Dec 07, 2018 12:38 am Post subject: |
|
|
hedmo wrote: | Fitzcarraldo wrote: | Are you using KDE by any chance? If you are, check the contents of ~/.config/plasma-localerc and change if incorrect. |
Fitzcarraldo
i have set en_US.UTF-8 in plasma-localerc to but after i reboot,i get : LANG=sma_SE.UTF-8 again
regards hedmo |
Try editing both files ~/.config/plasma-locale-settings.sh and ~/.config/plasma-localerc:
Code: | $ locate plasma-locale
/home/fitzcarraldo/.config/plasma-locale-settings.sh
/home/fitzcarraldo/.config/plasma-localerc
$ grep LANG= ~/.config/plasma-locale*
/home/fitzcarraldo/.config/plasma-locale-settings.sh:export LANG=en_GB.UTF-8
/home/fitzcarraldo/.config/plasma-localerc:LANG=en_GB.UTF-8 |
Except in your case use en_US.UTF-8 of course. _________________ Clevo W230SS: amd64, VIDEO_CARDS="intel modesetting nvidia".
Compal NBLB2: ~amd64, xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC udev elogind & KDE on both.
Fitzcarraldo's blog |
|
Back to top |
|
|
hedmo Veteran
Joined: 29 Aug 2009 Posts: 1305 Location: sweden
|
Posted: Fri Dec 07, 2018 7:40 am Post subject: |
|
|
hi all
it was plasma-locale-settings.sh that had : export LANG=sma_SE.UTF-8 in it.changed it and now all is okej
thanks all!!!
regards hedmo |
|
Back to top |
|
|
|