1

I'm using i3wm, after an update, I run into a locale problem that doesn't let me run i3status correctly.

I had a major advance on this issue. Reconfigure locale on /etc/locale.gen and also on /etc/default/locale, and now when I run i3status as root, it works, but when I start the system (as my user), it throw status_command process exited unexpectedly.

I tried to give those files full permission (777), but id doesn't work neither.

I know that the problem is almost fixed, until I run locale-gen, and dpkg-reconfigure locales, as soon as I opened a terminal, before the prompt it said Could not set locale. Please make sure all your LC_* / LANG settings are correct.

Now I only have this error when I try to run i3status. Any ideas about how can I recover i3wm from this issue?

When I type locale as root the file shows:

LANG=en_US.UTF-8
LANGUAGE=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=

When I run it as my user it doesn't have LANGUAGE variable set:

LANG=es_US.utf8
LANGUAGE=
LC_CTYPE="es_US.utf8"
LC_NUMERIC="es_US.utf8"
LC_TIME="es_US.utf8"
LC_COLLATE="es_US.utf8"
LC_MONETARY="es_US.utf8"
LC_MESSAGES="es_US.utf8"
LC_PAPER="es_US.utf8"
LC_NAME="es_US.utf8"
LC_ADDRESS="es_US.utf8"
LC_TELEPHONE="es_US.utf8"
LC_MEASUREMENT="es_US.utf8"
LC_IDENTIFICATION="es_US.utf8"
LC_ALL=

3 Answers 3

3

Fixed! I just copy the response of running locale as root to /etc/default/locale and everything works like a charm now!

0

Here's what you most likely need to do in order to properly fix this problem....

  1. The problem:

    [user@archlinux ~]$ i3status
    Could not set locale. Please make sure all your LC_* / LANG settings are correct.
    
  2. Edit /etc/locale.conf so that it contains (at least) your chosen "locale" values for variables:

    [user@archlinux ~]$ cat /etc/locale.conf
    LANG=en_GB.UTF-8
    LANGUAGE=en_GB.UTF-8
    
  3. Generate the locale using locale-gen:

    [user@archlinux ~]$ sudo locale-gen 
    Generating locales...
      en_GB.UTF-8... done
    Generation complete.
    
  4. Test i3status command (should work fine)...

    [mconway@bigwig ~]$ i3status
    {"version":1}
    [
    [<DATA>]
    [<DATA>]
    ...
    
  5. DO NOT hack stuff by doing things such as setting/overriding "system" environment variables such as LC_ALL=C <command (Note LC_ALL should only be used for troubleshooting/testing)

-1

I was able to fix this problem by adding LC_ALL=C to the invocation of i3status from .i3/config:

what I had:

    status_command i3status --config ~/.i3/i3status.conf

what I replaced it with:

    status_command LC_ALL=C i3status --config ~/.i3/i3status.conf
1
  • This isn't a "fix" it is a workaround, and an ill-advised one at that...
    – jasonwryan
    Oct 6, 2017 at 22:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .