You are not logged in.

#1 2016-04-28 14:25:11

mexchip
Member
Registered: 2016-04-28
Posts: 8

[Solved] locale problem in LXQT, cannot set LC_CTYPE to default locale

When running locale -a inside a lxqt session I get this:

$ locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
POSIX
en_US.utf8

But when running xfce4 instead:

$ locale -a
C
POSIX
en_US.utf8

I've already checked the /etc/locale.gen file and run locale-gen, what could be a reason for this different behaviour when running lxqt session?

Last edited by mexchip (2016-08-12 21:57:02)

Offline

#2 2016-04-28 14:28:18

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,560

Re: [Solved] locale problem in LXQT, cannot set LC_CTYPE to default locale

What's in /etc/locale.conf?

Offline

#3 2016-04-28 14:29:16

mexchip
Member
Registered: 2016-04-28
Posts: 8

Re: [Solved] locale problem in LXQT, cannot set LC_CTYPE to default locale

I have this in /etc/locale.conf:

LANG=en_US.UTF-8

Last edited by mexchip (2016-04-28 14:29:46)

Offline

#4 2016-04-28 14:43:03

mexchip
Member
Registered: 2016-04-28
Posts: 8

Re: [Solved] locale problem in LXQT, cannot set LC_CTYPE to default locale

I've found the problem:
I've used lxqt-config-locale to set the region of my system to a non English one. Changing the region to US fixes this problem.
I don't know how locale configuration works insde lxqt since I was expecting it to use the /etc/locale.conf configuration.

Thanks for your time.

Offline

#5 2016-06-05 18:32:18

krabat
Member
Registered: 2014-07-03
Posts: 40

Re: [Solved] locale problem in LXQT, cannot set LC_CTYPE to default locale

Configuration dialogue lxqt-config-locale is meant to adjust the same variables like /etc/locale.conf but the settings apply to the LXQt session only. Within the LXQt session they apply to all applications and are not limited to the LXQt components, though. So when e. g. /etc/locale.conf reads 'LANG="de_DE.UTF-8"' and "Region" is set to "France - français (fr_FR)" in lxqt-config-locale while all other settings remain unchanged you get

$ locale 
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.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=

in virtual terminals while at the same time

$ locale 
LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC=fr_FR.UTF-8
LC_TIME=fr_FR.UTF-8
LC_COLLATE=fr_FR.UTF-8
LC_MONETARY=fr_FR.UTF-8
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT=fr_FR.UTF-8
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=

in a terminal emulator running in an LXQt session.

The error messages in your first comment come up when the default locale set in /etc/locale.conf or lxqt-config-locale isn't available. The list of locales in lxqt-config-locales needs to be reconsidered, see https://github.com/lxde/lxqt/issues/886. To get an overview which translations are available in LXQt you may look through the repository https://github.com/lxde/translations where all of them have been summarized recently.

All in all you can set what ever you want in lxqt-config-locale but should make sure translations corresponding to the locale have already been made. In order to avoid those error messages you need to generate the respective locale which is described in the wiki.

Offline

#6 2016-08-12 21:56:07

mexchip
Member
Registered: 2016-04-28
Posts: 8

Re: [Solved] locale problem in LXQT, cannot set LC_CTYPE to default locale

Thanks a lot for all of the info krabat, now I understand it smile.

Offline

Board footer

Powered by FluxBB