You are not logged in.

#1 2017-04-12 22:41:57

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

[SOLVED] I18N: X Window System doesn't support any locale

I have an issue under X, which does not allow me to print or to type accentuated characters under any CLI application. So I can't display or write in my language (French which has various accentuated characters) under CLI apps such as `vim`. `dmenu` (i3-wm application launcher) won't start being one of the consequences.
This is true for any user, be it brand new, and only under X (no such issue on a tty). Please help to hopefully solve this. Here's my related post on the Arch French forum.

$ urxvt
urxvt: the locale is not supported by Xlib, continuing without locale support.

$ dmenu&
 27
 28       [1] 3608
 29       no locale support
 30
 31       [1]+  Stopped                 dmenu

$ libreoffice &
[1] 8270
[kozaki@llewellyn ~]$ Warning: failed to read path from javaldx
I18N: X Window System doesn't support locale "en_US.UTF-8"
I18N: Operating system doesn't support locale "en_US"
I18N: X Window System doesn't support locale "C"

$ vim
Je ne peux crire de caractres accentus franais.

(kozaki) $ locale

LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=

Please note that with another user, "C" is replaced by "fr_FR.UTF-8". But there's no way to print accentuated characters either.

$ locale -a

C
POSIX
en_US.utf8
fr_FR.utf8

$ setxkbmap -query -print

xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(azerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+fr(latin9)+fr(oss):2+inet(evdev)+compose(menu)+terminate(ctrl_alt_bksp)"   };
        xkb_geometry  { include "pc(pc105)"     };
};
rules:      evdev
model:      pc105
layout:     fr,fr
variant:    latin9,oss
options:    compose:menu,terminate:ctrl_alt_bksp

$ loginctl session-status

c1 - kozaki (1001)
           Since: Sun 2017-04-09 20:44:10 CEST; 3 days ago
          Leader: 1983
            Seat: seat0; vc1
             TTY: tty1
         Service: login; type tty; class user
           State: closing
            Unit: session-c1.scope
                  |- 2388 ssh-agent
                  |- 2550 tmux attach -t main
                  |- 2551 -bash
                  |- 2557 -bash
                  |- 2561 -bash
                  |- 2563 /usr/bin/python -O /usr/bin/ranger /data/synchronline/kozaki/enclair/buffer/
                  |- 2566 -bash
                  |- 2569 -bash
                  |- 2573 -bash
                  |- 3235 -bash
                  |- 3608 dmenu
                  |- 7786 loginctl session-status
                  |- 7787 less
                  |-19151 vim llewellyn-suivi-system.rst
                  |-20852 /usr/lib/firefox/firefox
                  |-27223 vim arch-conf.md
                  |-30447 /usr/lib/firefox/firefox --new-instance -P
                  `-31082 /usr/bin/python2 /usr/bin/radiotray

Apr 10 19:16:14 llewellyn sudo[14411]: pam_unix(sudo:session): session closed for user root
Apr 12 19:45:28 llewellyn sudo[27456]: pam_ecryptfs: pam_sm_authenticate: /home/kozaki is already mounted
Apr 12 19:45:28 llewellyn sudo[27456]:   kozaki : TTY=pts/3 ; PWD=/data/synchronline/kozaki/enclair/buffer/info/NOTES ; USER=root ; COMMAND=/usr/bin/pacman --co
Apr 12 19:45:28 llewellyn sudo[27456]: pam_unix(sudo:session): session opened for user root by kozaki(uid=0)
Apr 12 19:45:39 llewellyn sudo[27456]: pam_unix(sudo:session): session closed for user root
Apr 12 19:45:59 llewellyn sudo[27645]:   kozaki : TTY=pts/3 ; PWD=/data/synchronline/kozaki/enclair/buffer/info/NOTES ; USER=root ; COMMAND=/usr/bin/pacman --co
Apr 12 19:45:59 llewellyn sudo[27645]: pam_unix(sudo:session): session opened for user root by kozaki(uid=0)
Apr 12 19:48:33 llewellyn sudo[27645]: pam_unix(sudo:session): session closed for user root
Apr 12 23:51:18 llewellyn su[29455]: (to lliseil) kozaki on pts/2
Apr 12 23:51:18 llewellyn su[29455]: pam_unix(su-l:session): session opened for user lliseil by kozaki(uid=1001)

/etc/locale.conf

LANG=fr_FR.UTF-8  # same issue with "en_US.UTF-8"

$TERM: rxvt-unicode-256color

I have set no "LANG=" in either ~/.profile or ~/.bashrc.

As the issue is only under X I have replaced ~/.xinitrc by the most basic one (only starts i3) but the problem is unchanged.

Just in case, output of this script that test the 'locale'

./locale-check.sh

* Parent:       1 /sbin/init
	* Terminal: 11827 urxvt
	* Shell:    11828 -bash
                                                                                     
	warning: Parent's environment is inaccessible, skipping term=parent checks.
	warning: (shell) LANG: non-UTF8 locale "C"
	warning: (term) LANG: non-UTF8 locale "C"
                                                                                     
	problem: Your current locale is using a legacy charset.
	* The incorrect variables are:
		- (shell) LANG         (currently "C")
		- (term) LANG          (currently "C")
	* Change your locales to their UTF-8 variants.
                                                                                     
	1 problems found. Here's a quick UTF-8 test for you:  --> ? <--
	* a star             -- font and terminal are okay.
	* 3 question marks   -- your terminal does not correctly interpret UTF-8.
	* a box or rectangle -- UTF-8 works fine, but you need a better font.
	* empty area         -- you really need a better font or something.

"References" I found:

- FS#51442 - [libx11] 1.6.4-1 breaks diacritics with LibreOffice
> With libx11 1.6.5-1 both the issues are fixed.

- [solved] locale issue
> /usr/bin/pacmatic: line 6: \
> warning: setlocale: LC_TIME: cannot change locale (en_US.utf8): No such file or directory

It seems an application added some environment variable in /var/lib/Accounts...

- 2013, likely similar but unsolved : https://bbs.archlinux.org/viewtopic.php?id=163501 and https://bbs.archlinux.org/viewtopic.php?id=163318

- Under Debian libx11 1.6.4-2 caused a "similar" issue http://debian.2.n7.nabble.com/Bug-84734 ... 51954.html
> I did downgrade back to 2:1.6.3-1 and the problem is gone.

Last edited by kozaki (2017-04-26 17:13:39)


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#2 2017-04-12 23:24:11

loqs
Member
Registered: 2014-03-06
Posts: 17,194

Re: [SOLVED] I18N: X Window System doesn't support any locale

https://bbs.archlinux.org/viewtopic.php?id=219327 even if the cause is not the same some of the diagnostics may help locate the cause.

Offline

#3 2017-04-12 23:35:02

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] I18N: X Window System doesn't support any locale

Is this a recent problem? Did it happen after an update?

No other ideas here but this is worth a deeper look:

kozaki wrote:

Please note that with another user, "C" is replaced by "fr_FR.UTF-8". But there's no way to print accentuated characters either.

If with a new/other user account the 'locale' output is as you expect then you want to figure out why. Maybe there is something extra in your user account that is breaking things.

If showing the characters works with a user account where locale has the correct output that points to a font or terminal problem. Have things worked fine before with that same terminal emulator? Have you done any recent changes to the system configuration files? Have you installed any new fonts recently?


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#4 2017-04-13 18:30:09

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: [SOLVED] I18N: X Window System doesn't support any locale

loqs I'm glad you linked to that thread; for the diagnostics yeah, and it's the closest one to the situation here! More below.

Rookie thanks too. The issue isn't recent; happened after Christmas just before I moved and had a busy period. I'll try to clarify:
- Yes with a new/other user account the 'locale' output is as I expect. And yes I wish I could have figured out why by myself but it seems I can't :}
- No, showing the accentuated characters does NOT work under X with a user account where `locale` has the correct output.
- The only system change I did was to remove Infinality, but that was *after* the issue had appeared.

Now following https://bbs.archlinux.org/viewtopic.php?id=219327

$ LC_CTYPE=C dmenu
no locale support

$ strace dmenu 2>&1 | grep -iE '(fr_FR|locale)'
open("/usr/share/X11/locale/locale.alias", O_RDONLY) = 3
open("/usr/share/X11/locale/locale.dir", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/X11/locale/locale.alias", O_RDONLY) = 3
open("/usr/share/X11/locale/locale.dir", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/X11/locale/locale.alias", O_RDONLY) = 3
open("/usr/share/X11/locale/locale.dir", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "no locale support\n", 18no locale support

- /usr/share/X11/locale/locale.dir is missing on this system too (but is present on my laptop that has Arch and no locale issue).
I had downgraded libx11 then updated it back as it did not change the issue. Just tried again and 'locale.dir' is still missing. Actually,

$ pacman -Qkk libx11
libx11: 1260 total files, 0 altered files

Temporarily copying this file from the laptop:
- Issue persists, and

$ pacman -Qkk libx11
warning: libx11: /usr/share/X11/locale/locale.dir (Modification time mismatch)
libx11: 1260 total files, 1 altered file

It's not as simple as a missing file. Also I can't remember trying out `Bleachbit`; it's not even installed here.

Can I just copy '/usr/share/X11/locale/' (e.g. from source or from my laptop's Arch)? Or is there something I can do to better diagnose where the issue came from?


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#5 2017-04-13 18:45:16

loqs
Member
Registered: 2014-03-06
Posts: 17,194

Re: [SOLVED] I18N: X Window System doesn't support any locale

Please compile the test program from https://bbs.archlinux.org/viewtopic.php … 6#p1668526 when executing it please use the user that has LANG=fr_FR.UTF-8 set in their environment.

Offline

#6 2017-04-13 20:34:46

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] I18N: X Window System doesn't support any locale

If you have missing files I'd say you may want to run an 'fsck -f' from the boot media, then boot your system, run 'pacman -Qkk' and grep for missing files, then reinstall all the packages that have missing files. I'd say that for now you shouldn't downgrade any packages, let's not introduce more variables to the problem.

You might also want to check what smartctl has to say about the health of the hard disk, just to be sure your hardware is working properly before starting to try to solve this problem.

If you know more or less the date when the problem stated then you can check your pacman log and see what was updated around that time, that might provide some clues.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#7 2017-04-13 21:39:27

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] I18N: X Window System doesn't support any locale

kozaki wrote:

[...]

Can I just copy '/usr/share/X11/locale/' (e.g. from source or from my laptop's Arch)? Or is there something I can do to better diagnose where the issue came from?

Don't copy it from your laptop. Do "sudo pacman -S libx11" to reinstall the libx11 package. It is the only Arch package that writes into that /usr/share/X11/locale/ folder.

You can check who owns a folder like this:

$ pacman -Qo /usr/share/X11/locale
/usr/share/X11/locale/ is owned by libx11 1.6.5-1

This particular folder is only owned by the libx11 package, so that's the only package you have to reinstall.

Offline

#8 2017-04-13 22:05:38

loqs
Member
Registered: 2014-03-06
Posts: 17,194

Re: [SOLVED] I18N: X Window System doesn't support any locale

Ropid wrote:

Don't copy it from your laptop. Do "sudo pacman -S libx11" to reinstall the libx11 package. It is the only Arch package that writes into that /usr/share/X11/locale/ folder.

Ropid did you miss?

kozaki wrote:

I had downgraded libx11 then updated it back as it did not change the issue. Just tried again and 'locale.dir' is still missing.

Edit:
Should add

# rm /usr/share/X11/locale/locale.dir 
$ pacman -Qkk libx11
warning: libx11: /usr/share/X11/locale/locale.dir (No such file or directory)
libx11: 1260 total files, 1 altered file
# pacman -S libx11 
warning: libx11-1.6.5-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) libx11-1.6.5-1

Total Installed Size:  10.54 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
(1/1) checking available disk space                [######################] 100%
warning: could not get file information for usr/share/X11/locale/locale.dir
:: Processing package changes...
(1/1) reinstalling libx11                          [######################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[stephen@arch ~]$ pacman -Qkk libx11
libx11: 1260 total files, 0 altered files

As expected /usr/share/X11/locale/locale.dir is restored which should be same on downgrade followed by upgrade.
So it does seem odd on kozaki's system it was not restored which does lend credence in my view to Rookies point about hardware failure / filesystem corruption.

Last edited by loqs (2017-04-13 23:00:39)

Offline

#9 2017-04-14 00:13:21

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: [SOLVED] I18N: X Window System doesn't support any locale

ROOKIE wrote:

If you have missing files I'd say you may want to run an 'fsck -f' from the boot media, then boot your system, run 'pacman -Qkk' and grep for missing files, then reinstall all the packages that have missing files. I'd say that for now you shouldn't downgrade any packages, let's not introduce more variables to the problem.

You might also want to check what smartctl has to say about the health of the hard disk, just to be sure your hardware is working properly before starting to try to solve this problem.

Youre right; fortunately the Sandisk SSD attributes are all fine; it's monitored and would have sent me a warning in case of errr, S.M.A.R.T. warning.
Now I have a guess on who's the culprit. In the absence of Bleachbit on this system, I can only think of `localepurge` that may have purged "unwanted" locale files, ha! I'll disable it and reinstall libx11.

ROPID wrote:

Don't copy it from your laptop. Do "sudo pacman -S libx11" to reinstall the libx11 package. It is the only Arch package that writes into that /usr/share/X11/locale/ folder.

Yeap! and see above a possible reason for that surprising behaviour when I reinstalled this package.

loqs wrote:

Edit:
Should add

# rm /usr/share/X11/locale/locale.dir 
$ pacman -Qkk libx11
warning: libx11: /usr/share/X11/locale/locale.dir (No such file or directory)
libx11: 1260 total files, 1 altered file
# pacman -S libx11 

Well, *that* is really surprising me:

$ sudo pacman -Qkk libx11
libx11: 1260 total files, 0 altered files

$ ls -l /usr/share/locale/locale.dir  
ls: cannot access '/usr/share/locale/locale.dir': No such file or directory

How can a package's file be missing when there's 0 altered files???

I now have desactivated localepurge, then

$ sudo pacman -S libx11
warning: libx11-1.6.5-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Package (1)   Old Version  New Version  Net Change

extra/libx11  1.6.5-1      1.6.5-1        0.00 MiB

Total Installed Size:  10.54 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                        [-------------------------------------------------] 100%
(1/1) checking package integrity                                                      [-------------------------------------------------] 100%
(1/1) loading package files                                                           [-------------------------------------------------] 100%
(1/1) checking for file conflicts                                                     [-------------------------------------------------] 100%
(1/1) checking available disk space                                                   [-------------------------------------------------] 100%
:: Processing package changes...
(1/1) reinstalling libx11                                                             [-------------------------------------------------] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

_(kozaki@llewellyn]_(0)_(~)_(19 files, 2.4Mb)
__> [0]$ ls -l /usr/share/locale/locale.dir
ls: cannot access '/usr/share/locale/locale.dir': No such file or directory

WTH??

loqs wrote:

Please compile the test program from https://bbs.archlinux.org/viewtopic.php … 6#p1668526 when executing it please use the user that has LANG=fr_FR.UTF-8 set in their environment.

I'll do it but tomorrow for fun (it'll be a first for me :}), as it's quite late atm.


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#10 2017-04-14 00:44:23

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] I18N: X Window System doesn't support any locale

You mistyped the "ls -l ..." after you reinstalled the package. You checked for a name "/usr/share/locale/locale.dir" but it is "/usr/share/X11/locale/locale.dir".

EDIT: This whole behavior you see is strange. Just now, I tried this here:

$ sudo rm /usr/share/X11/locale/locale.dir 

$ pacman -Qkk libx11
warning: libx11: /usr/share/X11/locale/locale.dir (No such file or directory)
libx11: 1260 total files, 1 altered file

It finds that missing file for me. There might be a weird bug in pacman or in some library it uses? Something that only happens for you.

EDIT2: I think I would check the hardware. I would check that one important table shown in the output of "smartctl -x /dev/sda" or "smartctl -a /dev/sda". I would run the filesystem's check tool manually. I would install and run memtest86. (And something unusual: I'm overclocking and this means I would run my usual stability tests for that like mprime and Intel's linpack.)

Last edited by Ropid (2017-04-14 00:57:40)

Offline

#11 2017-04-14 01:39:28

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [SOLVED] I18N: X Window System doesn't support any locale

To add to what Ropid suggests, disable any other "cleaners", tweaks and mods you might have. I would also disable smartd for now unless you are 100% sure it is not causing trouble, as I've seen disks (the spinning rust kind) with buggy firmware eat data because of smart probes.

You also mention an SSD, if you have trim/discard enabled I would also disable that for now, or at least disable queued trim (ncq trim) as some SSDs claim to support it but will eat your data if you try to use it. The kernel has a whitelist/blacklist but I don't know how thorough it is.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#12 2017-04-14 18:18:10

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: [SOLVED] I18N: X Window System doesn't support any locale

Thank you guys!

Ah yeah sorry, I mistyped the path yesterday night (wasn't a typo). But 'locale.dir' *is* effectively missing after reinstalling libx11:

$ ls -l /usr/share/X11/locale/locale.dir
ls: cannot access '/usr/share/X11/locale/locale.dir': No such file or directory

OK to temporarily disable any potential "system modifier". Have disabled localepurge, smartd and ordered a forced filesystem check. Please note that all S.M.A.R.T. attributes are very good. Garbage collection is actually done via the fstrim timer once a week, no discard here. I will now logout to run the hardware tests; something I do frequently at the local DIY house where I lead the refurbished PCs project.

EDIT: Here are the tests result
- Memtest86 (full test) showed no error.
- fsck.ext4 -fv says no inconsistency for the root partition (lvm2 logical volume).
Yet

# pacman -Qkk libx11
libx11: 1260 total files, 0 altered files

# ls -l /usr/share/X11/locale/
total 324K
drwxr-xr-x 2 root root 4.0K Oct 10  2016 C/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 am_ET.UTF-8/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 armscii-8/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 cs_CZ.UTF-8/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 el_GR.UTF-8/
drwxr-xr-x 2 root root 4.0K Apr 14 22:25 en_US.UTF-8/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 fi_FI.UTF-8/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 georgian-academy/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 georgian-ps/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 ibm-cp1133/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 iscii-dev/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 isiri-3342/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 iso8859-1/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 iso8859-10/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 iso8859-11/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 iso8859-13/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 iso8859-14/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 iso8859-15/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 iso8859-2/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 iso8859-3/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 iso8859-4/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 iso8859-5/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 iso8859-6/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 iso8859-7/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 iso8859-8/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 iso8859-9/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 iso8859-9e/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 ja/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 ja.JIS/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 ja.SJIS/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 ja_JP.UTF-8/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 km_KH.UTF-8/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 ko/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 ko_KR.UTF-8/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 koi8-c/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 koi8-r/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 koi8-u/
-rw-r--r-- 1 root root  80K Feb 27 17:54 locale.alias
drwxr-xr-x 2 root root 4.0K Oct 10  2016 microsoft-cp1251/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 microsoft-cp1255/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 microsoft-cp1256/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 mulelao-1/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 nokhchi-1/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 pt_BR.UTF-8/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 ru_RU.UTF-8/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 sr_CS.UTF-8/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 tatar-cyr/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 th_TH/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 th_TH.UTF-8/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 tscii-0/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 vi_VN.tcvn/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 vi_VN.viscii/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 zh_CN/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 zh_CN.UTF-8/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 zh_CN.gb18030/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 zh_CN.gbk/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 zh_HK.UTF-8/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 zh_HK.big5/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 zh_HK.big5hkscs/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 zh_TW/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 zh_TW.UTF-8/
drwxr-xr-x 2 root root 4.0K Oct 10  2016 zh_TW.big5/

I'll go compile as advised by loqs just after dinner.

Last edited by kozaki (2017-04-14 20:27:56)


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#13 2017-04-16 18:44:52

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: [SOLVED] I18N: X Window System doesn't support any locale

localesupport

// gcc -o localesupport -lX11 localesupport.c
#include <stdio.h>
#include <locale.h>
#include <X11/Xlib.h>

int main(int c, char **args) {
    printf("locale %s\n", setlocale(LC_CTYPE, "") ? "yup" : "nay");
    printf("Xorg %s\n", XSupportsLocale() ? "yup" : "nay");
}

- Run with user that has the wanted locale and miss accentuated characters in CLI apps:

$ ./localesupport 
locale yup
Xorg yup

- Run with the main user (locale=C):

$ ./localesupport 
locale yup
Xorg nay

Which I think confirms this issue (at least a part of it) can be narrowed down to Xorg under my main user on that system.

Then I checked this system for missing files (note: after I disabled `localepurge`).
# pacman -Qkk

...
warning: openssh: /usr/lib/systemd/system/sshd.socket (Size mismatch)
warning: pacman: /usr/share/locale/en_GB/LC_MESSAGES/libalpm.mo (No such file or directory)
warning: pacman: /usr/share/locale/en_GB/LC_MESSAGES/pacman-scripts.mo (No such file or directory)
warning: pacman: /usr/share/locale/en_GB/LC_MESSAGES/pacman.mo (No such file or directory)
warning: pacman: /var/cache/pacman/pkg (File type mismatch)
warning: pam: /usr/share/locale/en_GB/LC_MESSAGES/Linux-PAM.mo (No such file or directory)
...

# pacman -S pacman

...
warning: openssh: /usr/lib/systemd/system/sshd.socket (Size mismatch)
warning: pam: /usr/share/locale/en_GB/LC_MESSAGES/Linux-PAM.mo (No such file or directory)
...

Reinstalling pacman (or any other pkg I tried) *does* install files that were "purged" with localepurge. Fine! Now the same operation for libx11 leaves /usr/share/X11/locale/ with 2 missing files and 1 dir compared to the untarred package: ''compose.dir', 'locale.dir' and '_/pt_PT.UTF-8'.
8-}


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#14 2017-04-16 18:51:06

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: [SOLVED] I18N: X Window System doesn't support any locale

Note that you can remove and reinstall libx11 until you are blue in the face.  As long as you just keep reinstalling your cached libx11 package, it will not have any affect.  Clear your cache and/or remove the most recent libx11 package from your cache, then reinstall it, so a fresh copy is downloaded from the repos.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#15 2017-04-16 19:40:42

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: [SOLVED] I18N: X Window System doesn't support any locale

Trilby the 'SigLevel    = Required DatabaseOptional' in /etc/pacman.conf should forbid any package modification, shouldn't it?
Now as `pacman -S pacman` did clear the cache, I reinstalled libx11 from repo. After what, well, the 2 files and 1 directory are missing in '/usr/share/X11/locale/'!

Next test, I untarred 'libx11-1.6.5-1-x86_64.pkg.tar.xz' and manually copied the 2 missing files to '/usr/share/X11/locale/'. Re-generated the locale, rebooted, started X with startx (with a *minimal*~/.xinitrc).
- Main user has 'locale -> C' and misses UTF-8 in CLI apps.
- Other user has 'locale -> fr_FR.UTF-8' and this time *has* UTF-8 in CLI apps.
Gave me the idea to test from main user:
in tty:

$ locale -> says "C"

$ LANG=fr_FR.UTF-8; export LANG
$ locale -> says "fr_FR.UTF-8"
$ startx

Finaly the main user has 'locale -> fr_FR.UTF-8' and *has* UTF-8 in CLI apps.
EDIT
But

$ LANG=en_US.UTF-8 dmenu_run 
no locale support

└─> [0]$ /usr/bin/dmenu_run: line 15:  5155 Done                    stest -flx $PATH
      5156                       | sort -u
      5157                       | tee "$cache"
      5158 Segmentation fault      (core dumped) | dmenu "$@"

Does these couple of tests help you diagnose where the problem stands better than me?

Last edited by kozaki (2017-04-16 19:43:43)


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#16 2017-04-16 19:45:25

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,444
Website

Re: [SOLVED] I18N: X Window System doesn't support any locale

If the files were actually in the pkg.tar.xz, but they were not installed, I'd have to suspect they are listed as NoExtract in your pacman.conf.  Can you post your full pacman.conf?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#17 2017-04-16 19:53:28

loqs
Member
Registered: 2014-03-06
Posts: 17,194

Re: [SOLVED] I18N: X Window System doesn't support any locale

Trilby if the cached pkg.tar.gz was corrupted how would it pass pacman's integrity and signature checking?

Offline

#18 2017-04-16 19:55:48

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: [SOLVED] I18N: X Window System doesn't support any locale

Yes the files were/are in the pkg.tar.gz. /etc/pacman.conf

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir    = /
#DBPath     = /var/lib/pacman/
#CacheDir   = /var/cache/pacman/pkg/
#LogFile    = /var/log/pacman.log
#GPGDir     = /etc/pacman.d/gnupg/
#HookDir    = /etc/pacman.d/hooks/
HoldPkg    = pacman glibc
# If upgrades are available for these packages they will be asked for first
## SyncFirst   = pacman yaourt package-query	# Not valid anymore Pacman-4.0.1
CleanMethod = KeepCurrent
# Prevents pacman -Sc to delete any current pkg not installed on this box (custom repo shared between boxes)

# Get method ( wget automatically resumes downloads)
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#XferCommand = /usr/bin/aria2c --allow-overwrite=true -c --file-allocation=none --log-level=error -m2 -x2 --max-file-not-found=5 -k5M --no-conf -Rtrue --summary-interval=60 -t5 -d / -o %o %u

#CleanMethod = KeepInstalled
#UseDelta    = 0.7
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
NoExtract = usr/share/help/* !usr/share/help/en*
NoExtract = usr/share/locale/* usr/share/X11/locale/* usr/share/i18n/locales/* opt/google/chrome/locales/*
NoExtract = !*locale*/en* !*locale*/fr* !usr/share/*locale*/locale.alias !usr/share/*locales/i18n !usr/share/*locales/iso* !usr/share/*locales/trans*
NoExtract = usr/share/man/* !usr/share/man/man*
NoExtract = usr/share/vim/vim74/lang/*

# Misc options
#UseSyslog
Color
#TotalDownload
CheckSpace
VerbosePkgLists
ILoveCandy

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Optional

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# Custom repo
# Ensures that the files from this repo take precedence over those in the standard repositories:
[tukoz]
SigLevel = Optional
Server = file:///mnt/net/repo/$arch
#Server = http://sysadmin.lliseil.fr/linux/repo/arch/$arch

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

#[testing]
#Include = /etc/pacman.d/mirrorlist

[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

#[community-testing]
#Include = /etc/pacman.d/mirrorlist

[community]
Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist

[multilib]
Include = /etc/pacman.d/mirrorlist

[repo-ck]
#SigLevel = Required DatabaseOptional
Server = http://repo-ck.com/$arch
Server = http://repo-ck.com/$arch
Server = http://repo-ck.com/$arch

[archlinuxfr]
SigLevel = Optional TrustAll
Server = http://repo.archlinux.fr/$arch

## Removing infinality as it is down, and has never worked good for me
## - https://gist.github.com/cryzed/e002e7057435f02cc7894b9e748c5671
#
#[infinality-bundle]
#SigLevel = Optional TrustAll
# https://wiki.archlinux.org/index.php/Infinality
#Server = http://bohoomil.com/repo/$arch
#
#[infinality-bundle-fonts]
#SigLevel = Optional TrustAll
#Server = http://bohoomil.com/repo/fonts

[herecura]
#  Description: additional packages not found in the community repository (eg. Chrome, Opera, Vivaldi)
#  Key-ID: Not required, as maintainer Ike Devolder is a TU.
#  Packages built against core.
Server = http://repo.herecura.be/herecura/x86_64
Server = http://repo.herecura.be/herecura/x86_64
Server = http://repo.herecura.be/herecura/x86_64

[alextalker]
# Desc: Firefox Aurora
SigLevel = Optional TrustAll
Server = http://alextalker.ho.ua/aurrepo/
Server = http://alextalker.ho.ua/aurrepo/
Server = http://alextalker.ho.ua/aurrepo/

[quarry]
# rubygems binary repository for Arch Linux x86_64
Server = http://pkgbuild.com/~anatolik/quarry/x86_64/

You guessed correctly Trilby. hhh I totally forgot I had set these --and to check pacman.conf thoroughly. I'll now go comment them and test.


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#19 2017-04-26 17:19:59

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: [SOLVED] I18N: X Window System doesn't support any locale

Eight days and same number of system update later without a glinch. I can thank you guys especially Trillby for *solving* this issue.
Also I'm going to post a warning on the AUR where I had found the NoExtract rules that temporarily ruined my desktop's locale abilities.

EDIT: Sharing the NoExtract rules I'm now using in /etc/pacman.conf, only as an *example*:

NoExtract = usr/share/help/* !usr/share/help/en*                              
NoExtract = usr/share/locale/* usr/share/X11/locale/* usr/share/i18n/locales/* opt/google/chrome/locales/*
NoExtract = !*locale*/en* !*locale*/fr* !usr/share/*locale*/locale.* !usr/share/*locales/i18n !usr/share/*locales/iso* !usr/share/*locales/trans*               
NoExtract = usr/share/man/* !usr/share/man/man*

This keeps English and French locales, preventing other languages files to be installed on my Arch desktop.

Last edited by kozaki (2017-04-26 17:27:49)


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

#20 2018-04-25 06:06:24

nanawel
Member
Registered: 2012-05-07
Posts: 88
Website

Re: [SOLVED] I18N: X Window System doesn't support any locale

Just in case someone hits this (very interesting) thread: I'd like to make a tiny fix to your configuration:

NoExtract = usr/share/help/* !usr/share/help/en*                              
NoExtract = usr/share/locale/* usr/share/X11/locale/* usr/share/i18n/locales/* opt/google/chrome/locales/*
NoExtract = !*locale*/en* !*locale*/fr* !*locale*/i18n* !usr/share/*locale*/locale.* !usr/share/*locales/i18n !usr/share/*locales/iso* !usr/share/*locales/trans*               
NoExtract = usr/share/man/* !usr/share/man/man*

I have added !*locale*/i18n* on the third line. It prevents a crash on locale generation after upgrading glibc (which happened today).
c.f. https://bbs.archlinux.org/viewtopic.php?id=236504

But thanks for the rest, it works very well!

Last edited by nanawel (2018-04-25 06:06:54)

Offline

#21 2018-04-25 11:26:33

kozaki
Member
From: London >. < Paris
Registered: 2005-06-13
Posts: 671
Website

Re: [SOLVED] I18N: X Window System doesn't support any locale

@nanawel I had forgotten about NoExtract (again); how handy that comes right after the glibc update. Thx!


Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery smile) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9

Offline

Board footer

Powered by FluxBB