You are not logged in.

#1 2016-04-07 14:17:26

CLFAS
Member
Registered: 2014-04-13
Posts: 61

[SOLVED] Locale issue: "LANG= "

So I was trying to use a program when it was complaining about a lack of set language.

I checked locale and this is what I have:

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

I need it to read en_GB.UTF-8. Any ideas?

I'm using i3 WM.

Thanks

Last edited by CLFAS (2016-04-12 21:40:23)


Apples?

Offline

#2 2016-04-07 14:20:37

EmilyShepherd
Member
From: Bucks, UK
Registered: 2016-03-20
Posts: 45
Website

Re: [SOLVED] Locale issue: "LANG= "

Uncomment 'en_GB.UTF-8' from /etc/locale.gen, then run 'locale-gen' as root. Finally change /etc/locale.conf to add 'LANG=en_GB.UTF-8'.

May require a reboot after you've done that.

Offline

#3 2016-04-07 14:21:16

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,737
Website

Re: [SOLVED] Locale issue: "LANG= "

Have you read https://wiki.archlinux.org/index.php/Lo … the_locale?

Which shell are you using? What is the output of localectl?

Mod note: Moving to NC.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2016-04-07 15:27:16

CLFAS
Member
Registered: 2014-04-13
Posts: 61

Re: [SOLVED] Locale issue: "LANG= "

EmilyShepherd wrote:

Uncomment 'en_GB.UTF-8' from /etc/locale.gen, then run 'locale-gen' as root. Finally change /etc/locale.conf to add 'LANG=en_GB.UTF-8'.

May require a reboot after you've done that.

Same result.

WorMzy wrote:

Have you read https://wiki.archlinux.org/index.php/Lo … the_locale?

Which shell are you using? What is the output of localectl?

Mod note: Moving to NC.

I set it up months back (when I set up Arch), but I went over the wiki again just now for verification and... same result unfortunately...

Shell: bash 4.3.42

localectl output:

System Locale: LANG=en_GB.UTF-8
                  LC_CTYPE=POSIX
                  LC_NUMERIC=POSIX
                  LC_TIME=POSIX
                  LC_COLLATE=POSIX
                  LC_MONETARY=POSIX
                  LC_MESSAGES=POSIX
                  LC_PAPER=POSIX
                  LC_NAME=POSIX
                  LC_ADDRESS=POSIX
                  LC_TELEPHONE=POSIX
                  LC_MEASUREMENT=POSIX
                  LC_IDENTIFICATION=POSIX
       VC Keymap: uk
      X11 Layout: gb
       X11 Model: asus_laptop

Last edited by CLFAS (2016-04-07 15:29:47)


Apples?

Offline

#5 2016-04-07 16:08:50

CLFAS
Member
Registered: 2014-04-13
Posts: 61

Re: [SOLVED] Locale issue: "LANG= "

A bit of an update/extra info.

When I export LANG manually, it shows in locale, although it only shows it for that terminal session.
When I open up a new terminal (I tried urxvt and xterm), it's blank again. Same when I try and just run the program.


Apples?

Offline

#6 2016-04-07 16:13:33

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] Locale issue: "LANG= "

Log out and log back in again.

Offline

#7 2016-04-07 16:16:42

CLFAS
Member
Registered: 2014-04-13
Posts: 61

Re: [SOLVED] Locale issue: "LANG= "

Scimmia wrote:

Log out and log back in again.

Rebooted several times, as well as logging out, even after manually exporting. Same result.


Apples?

Offline

#8 2016-04-07 16:21:00

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] Locale issue: "LANG= "

Log in as a different user.

Offline

#9 2016-04-07 16:41:29

CLFAS
Member
Registered: 2014-04-13
Posts: 61

Re: [SOLVED] Locale issue: "LANG= "

Scimmia wrote:

Log in as a different user.

Same result.


Apples?

Offline

#10 2016-04-07 16:43:40

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,737
Website

Re: [SOLVED] Locale issue: "LANG= "

Can you post the output of 'pacman -Qkk bash filesystem'


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#11 2016-04-07 16:53:42

CLFAS
Member
Registered: 2014-04-13
Posts: 61

Re: [SOLVED] Locale issue: "LANG= "

WorMzy wrote:

Can you post the output of 'pacman -Qkk bash filesystem'

Well that's not good

warning: bash: /usr/bin/bash (Permissions mismatch)
bash: 141 total files, 1 altered file
backup file: filesystem: /etc/fstab (Modification time mismatch)
backup file: filesystem: /etc/fstab (Size mismatch)
backup file: filesystem: /etc/group (Modification time mismatch)
backup file: filesystem: /etc/group (Size mismatch)
backup file: filesystem: /etc/gshadow (Modification time mismatch)
backup file: filesystem: /etc/gshadow (Size mismatch)
warning: filesystem: /etc/mtab (Symlink path mismatch)
warning: filesystem: /etc/mtab (Modification time mismatch)
backup file: filesystem: /etc/passwd (Modification time mismatch)
backup file: filesystem: /etc/passwd (Size mismatch)
backup file: filesystem: /etc/resolv.conf (Modification time mismatch)
backup file: filesystem: /etc/resolv.conf (Size mismatch)
backup file: filesystem: /etc/shadow (Modification time mismatch)
backup file: filesystem: /etc/shadow (Size mismatch)
warning: filesystem: /etc/profile.d/locale.sh (Modification time mismatch)
warning: filesystem: /etc/profile.d/locale.sh (Size mismatch)
filesystem: 90 total files, 2 altered files

Apples?

Offline

#12 2016-04-07 16:54:02

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] Locale issue: "LANG= "

Also post /etc/locale.conf and any files in /etc/profile.d/ that aren't owned by a package.

Edit: What was changed in /etc/profile.d/locale.sh?

Last edited by Scimmia (2016-04-07 16:54:52)

Offline

#13 2016-04-07 17:03:52

CLFAS
Member
Registered: 2014-04-13
Posts: 61

Re: [SOLVED] Locale issue: "LANG= "

Scimmia wrote:

Also post /etc/locale.conf and any files in /etc/profile.d/ that aren't owned by a package.

Edit: What was changed in /etc/profile.d/locale.sh?

I just tried editing it to solve the issue. It reads the same as it does originally now, so size is the same again, just mod time mismatch now.

locale.conf:

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

I don't have any independent packages as far as I'm aware.

Here's a list of them for reference:
gpm.sh
jre.csh
jre.sh
libreoffice-still.csh
libreoffice-still.sh
locale.sh
mozilla-common.csh
mozilla-common.sh
perlbin.csh
perlbin.sh
vte.sh


Apples?

Offline

#14 2016-04-07 17:06:05

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] Locale issue: "LANG= "

Get rid of all of the LC_* lines in locale.conf. Log out, log back in, and run "locale" to check it.

Offline

#15 2016-04-07 17:07:42

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,737
Website

Re: [SOLVED] Locale issue: "LANG= "

CLFAS wrote:
WorMzy wrote:

Can you post the output of 'pacman -Qkk bash filesystem'

Well that's not good

warning: bash: /usr/bin/bash (Permissions mismatch)
...

This probably isn't related, but what are the permissions on /usr/bin/bash and why have you changed them to that?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#16 2016-04-07 17:11:50

CLFAS
Member
Registered: 2014-04-13
Posts: 61

Re: [SOLVED] Locale issue: "LANG= "

WorMzy wrote:

This probably isn't related, but what are the permissions on /usr/bin/bash and why have you changed them to that?

-rwxr-sr-x 1 root root 791304 Nov 23 20:20 /usr/bin/bash

I don't even remember changing them.

I reinstalled bash so it doesn't come up with that error now.

Last edited by CLFAS (2016-04-07 17:18:49)


Apples?

Offline

#17 2016-04-07 17:29:17

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] Locale issue: "LANG= "

CLFAS wrote:

-rwxr-sr-x 1 root root 791304 Nov 23 20:20 /usr/bin/bash

So bash is running setgid, meaning everything it's doing is being done as the root group. That's not good. If you didn't do it yourself, you need to find out how it happened.

Offline

#18 2016-04-07 17:37:46

CLFAS
Member
Registered: 2014-04-13
Posts: 61

Re: [SOLVED] Locale issue: "LANG= "

Scimmia wrote:
CLFAS wrote:

-rwxr-sr-x 1 root root 791304 Nov 23 20:20 /usr/bin/bash

So bash is running setgid, meaning everything it's doing is being done as the root group. That's not good. If you didn't do it yourself, you need to find out how it happened.

Well I've fixed it now, so it shouldn't be an issue in the future, should it?


Apples?

Offline

#19 2016-04-07 17:49:25

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] Locale issue: "LANG= "

CLFAS wrote:
Scimmia wrote:
CLFAS wrote:

-rwxr-sr-x 1 root root 791304 Nov 23 20:20 /usr/bin/bash

So bash is running setgid, meaning everything it's doing is being done as the root group. That's not good. If you didn't do it yourself, you need to find out how it happened.

Well I've fixed it now, so it shouldn't be an issue in the future, should it?

Depends on why it was set that way. If it was done maliciously, it could happen again.

Offline

#20 2016-04-07 19:45:28

CLFAS
Member
Registered: 2014-04-13
Posts: 61

Re: [SOLVED] Locale issue: "LANG= "

Scimmia wrote:
CLFAS wrote:
Scimmia wrote:

So bash is running setgid, meaning everything it's doing is being done as the root group. That's not good. If you didn't do it yourself, you need to find out how it happened.

Well I've fixed it now, so it shouldn't be an issue in the future, should it?

Depends on why it was set that way. If it was done maliciously, it could happen again.

Well I'll keep an eye on it.

Are there any packages I can reinstall that might fix it?


Apples?

Offline

#21 2016-04-09 22:53:32

CLFAS
Member
Registered: 2014-04-13
Posts: 61

Re: [SOLVED] Locale issue: "LANG= "

Ok so if the locale is an issue and not sure what is wrong, how can I go about resetting all settings related to locale? That way I can start from scratch.

Would there possibly any variables in a systemd process, xorg script/xresources or in my i3 config which could be interfering with it?

If so, could I possibly consolidate all the files (copies) and search within all the documents for every LANG, locale etc. possible variable and sift through them one-by-one? What's the best search tool/editor for doing that?

I usually use Atom but there was a memory leak issue with the current build so I have switched to Sublime Text for the time being.


Apples?

Offline

#22 2016-04-09 23:06:49

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] Locale issue: "LANG= "

CLFAS wrote:

Ok so if the locale is an issue and not sure what is wrong, how can I go about resetting all settings related to locale? That way I can start from scratch.

Scimmia wrote:

Get rid of all of the LC_* lines in locale.conf. Log out, log back in, and run "locale" to check it.

CLFAS wrote:

Would there possibly any variables in a systemd process, xorg script/xresources or in my i3 config which could be interfering with it?

systemd is very unlikely. xinit or xresources would be possible, but that would be very strange, especially since a new user has the same issue. I don't know a lot about i3, but I believe it's pretty minimal; I don't remember hearing about locale settings there.

CLFAS wrote:

If so, could I possibly consolidate all the files (copies) and search within all the documents for every LANG, locale etc. possible variable and sift through them one-by-one? What's the best search tool/editor for doing that?

Your shell init scripts could be an issue, but they would be the ones in /etc since it happens on multiple user accounts.

Offline

#23 2016-04-12 21:39:48

CLFAS
Member
Registered: 2014-04-13
Posts: 61

Re: [SOLVED] Locale issue: "LANG= "

This is not an issue now, although I'm unsure what fixed it, since I've made various changes to my system.


Apples?

Offline

Board footer

Powered by FluxBB