You are not logged in.

#1 2017-04-08 08:36:53

PogMat
Member
Registered: 2013-09-19
Posts: 42

[SOLVED]Strange environmental variables

Hi all,
I'm having a strange problem that I think can be installation dependent. If I type

env | grep LANG
LANG=en_US.UTF-8
LANGUAGE=en_US:it

the unwanted thing  is that ":it" which set language of many console program to italian. I do not want that. I have a computer with an italian keyboard, but,

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=

there is no trace of italian stuff. Also my locale.conf file

LANG=en_US.UTF-8

In /etc/profile I added

export LANGUAGE=en_US

and also

in /etc/envinronment

LANGUAGE=en_US

but nothing change. How can I detect which is the responsible for that oddi behaviour?

Many Thanks

Last edited by PogMat (2017-04-08 10:09:20)

Offline

#2 2017-04-08 08:45:42

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED]Strange environmental variables

Why are you setting a LANGUAGE variable at all? Please paste your shell initialisation files and details of how you login and start your environment.


Not an Installation issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-04-08 09:04:29

PogMat
Member
Registered: 2013-09-19
Posts: 42

Re: [SOLVED]Strange environmental variables

I set LANGUAGE variable because I want to overwrite the existent one, whose effect I want to avoid.

Mi files are:

1) bashrc

#
# ~/.bashrc
#

# If not running interactively, don't do anything                                                                                                                                                                                                  
[[ $- != *i* ]] && return                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                   


#PS1='[\u@\h \W]\$ '


PS1='\[\e[1;37m\][\[\e[1;32m\]\u\[\e[1;37m\]@\[\e[1;35m\]\h\[\e[1;37m\]: \[\e[0m\]\W\[\e[1;37m\]] $ \[\e[0m\]'

2) /etc/profile

# /etc/profile

#Set our umask
umask 022

# Set our default path
PATH="/usr/local/sbin:/usr/local/bin:/usr/bin"
export PATH

# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
        for profile in /etc/profile.d/*.sh; do
                test -r "$profile" && . "$profile"
        done
        unset profile
fi

# Source global bash config
if test "$PS1" && test "$BASH" && test -z ${POSIXLY_CORRECT+x} && test -r /etc/bash.bashrc; then
        . /etc/bash.bashrc
fi

# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP

# Man is much better than us at figuring this out
unset MANPATH

I log in with KDE. I have other pc with same setup (except this is a laptop) and it's the only that give me this problem. I don't know what I missed.

Do you need more config files?

Last edited by PogMat (2017-04-08 09:30:09)

Offline

#4 2017-04-08 09:08:01

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED]Strange environmental variables

You said you added it to /etc/profile, but there is no evidence of it there...

Grep your dotfiles for LANGUAGE. Also, look in KDE system settings.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2017-04-08 09:32:21

PogMat
Member
Registered: 2013-09-19
Posts: 42

Re: [SOLVED]Strange environmental variables

Sorry I didn't paste last line. I tried to grep for the key "en_US:it" but I couldn't find anything. What file do you think I have to grep for?

Offline

#6 2017-04-08 09:46:15

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED]Strange environmental variables

The weird locale might have been set by the login manager. It is difficfult to say exactly what it is but here is what I would try to debug the problem.

1) Create a new user "test" (for example), login as test and see if the problem persist. If not then it is something wrong in your KDE configuration.

2) Try the "brute force grep" (i.e. grep all text files in your system, it shouldn't be that long), as root:

find / -mount -type f -exec grep --binary-files=without-match "en_US:it" {} +

Note that it is better to use "en_US.utf8" instead of en_US but it is unrelated to your problem.

Last edited by olive (2017-04-08 09:53:42)

Offline

#7 2017-04-08 10:09:00

PogMat
Member
Registered: 2013-09-19
Posts: 42

Re: [SOLVED]Strange environmental variables

I found: was KDE Syetem Settings' fault. I just removed Italian from all menus. Thanks a lot

Offline

Board footer

Powered by FluxBB