You are not logged in.

#1 2020-03-22 18:12:41

AcidGod
Member
Registered: 2019-02-13
Posts: 34

Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

Hi, I am getting this error (Gtk-WARNING **: 18:09:11.981: Locale not supported by C library.
    Using the fallback 'C' locale) for various processes in my .xessesion-erorrs how can I fix that, I have uncomented en_GB.UTF-8 UTF-8   in /etc/locale.gen than run sudo locale-gen as instructed in arch wiki. What else should I do to get rid of this annoying warning?

Offline

#2 2020-03-22 18:18:41

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

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

AcidGod wrote:

I have uncomented en_GB.UTF-8 UTF-8   in /etc/locale.gen than run sudo locale-gen as instructed in arch wiki. What else should I do to get rid of this annoying warning?

That only generates the locale.  Locale#Setting_the_locale.

Offline

#3 2020-03-22 21:36:25

AcidGod
Member
Registered: 2019-02-13
Posts: 34

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

Sorry for being lame what do I need to generate in such case then?

Offline

#4 2020-03-22 22:11:04

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,736

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

You create the files with a text editor or run the commands mentioned in  the wiki section linked.

Last edited by V1del (2020-03-22 22:12:06)

Offline

#5 2020-03-23 19:18:43

AcidGod
Member
Registered: 2019-02-13
Posts: 34

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

Which files I need to create, could you please kindly point me in the right direction?

Offline

#6 2020-03-23 19:27:12

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

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

AcidGod wrote:

Which files I need to create, could you please kindly point me in the right direction?

You can not find any files mentioned in the 2.1 subsection of Locale#Setting_the_locale?

Last edited by loqs (2020-03-23 19:28:45)

Offline

#7 2020-03-24 12:00:18

AcidGod
Member
Registered: 2019-02-13
Posts: 34

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

loqs wrote:
AcidGod wrote:

Which files I need to create, could you please kindly point me in the right direction?

You can not find any files mentioned in the 2.1 subsection of Locale#Setting_the_locale?

I do not understand what I suppose to do to prevent this warning from appearing. I am not sure which locale is not supported or which locale variable I have to set to make this warning to go away. The warning is confusing that is why I am asking for help. I read this section but it does not explain why I am getting this warning. I did set the system locale to be en_GB.UTF8, then I tried en_US.UTF8 the warning still appears.

Last edited by AcidGod (2020-03-24 12:01:29)

Offline

#8 2020-03-24 12:15:04

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

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

AcidGod wrote:

I did set the system locale to be en_GB.UTF8, then I tried en_US.UTF8 the warning still appears.

How did you set the system locale?

Offline

#9 2020-04-09 17:51:25

AcidGod
Member
Registered: 2019-02-13
Posts: 34

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

I did it like it was instructed in here. https://wiki.archlinux.org/index.php/in … calization

Offline

#10 2020-04-09 17:58:29

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

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

What is the output of the following

cat /etc/locale.conf
grep -ve ^# /etc/locale.gen
locale -a
localectl

Offline

#11 2020-04-09 18:01:33

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,920

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

Post your /etc/locale.conf already asked by loqs.

Also post the outputs of the (three) commands in the wiki section posted by loqs in #2

Last edited by Lone_Wolf (2020-04-09 18:02:21)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#12 2020-04-09 18:09:29

AcidGod
Member
Registered: 2019-02-13
Posts: 34

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

My /etc/locale.conf

LANG=en_GB.UTF-8:en_US.UTF-8
LANGUAGE=en_GB:en_US.UTF-8
LC_ALL=en_US.UTF-8
C_CTYPE=en_US.UTF-8

I have added `export LC_ALL="en_US.UTF-8" to ~/.profile and the error disappeared. But having the same values in /etc/locale.conf still throws the same error.

grep -ve ^# /etc/locale.gen

en_US.UTF-8 UTF-8
en_GB.UTF-8 UTF-8

localectl

System Locale: LANG=en_GB.UTF-8:en_US.UTF-8
                  LANGUAGE=en_GB:en_US.UTF-8
       VC Keymap: uk
      X11 Layout: n/a

Does it mean I should be setting locale by creating export values in my .profile or I should setting them differently, like creating

~/.config/locale.conf

Last edited by AcidGod (2020-04-09 18:14:47)

Offline

#13 2020-04-09 18:16:48

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

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

wiki wrote:

To set the system locale, write the LANG variable to /etc/locale.conf, where en_US.UTF-8 belongs to the first column of an uncommented entry in /etc/locale.gen

How did you get

en_GB.UTF-8:en_US.UTF-8

from the first column of

en_US.UTF-8 UTF-8

Offline

#14 2020-04-09 18:22:29

AcidGod
Member
Registered: 2019-02-13
Posts: 34

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

I looked at LANGUAGE: fallback locales section of arch wiki thinking that If my main locale is en_GB.UTF-8, than fallback would be en_US.UTF-8 after the column.

Offline

#15 2020-04-09 18:25:26

AcidGod
Member
Registered: 2019-02-13
Posts: 34

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

Having 

LANG=en_US.UTF-8 UTF-8
LANGUAGE=en_US.UTF-8 UTF-8
LC_ALL=en_US.UTF-8
C_CTYPE=en_US.UTF-8

in /etc/locale.conf generates the following when I type locale

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_ALL to default locale: No such file or directory
LANG=C.UTF-8
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=

Offline

#16 2020-04-09 18:37:09

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

You didn't post the output of "locale -a", also "C.UTF-8" is not a thing.
There's something in a locale.conf or anything else imported to the profile (.profile, bashrc, …) that sets the invalid value.

Offline

#17 2020-04-09 18:40:01

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

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

LANG=en_US.UTF-8 UTF-8
LANGUAGE=en_US.UTF-8 UTF-8
LC_ALL=en_US.UTF-8
C_CTYPE=en_US.UTF-8

Only LC_ALL and C_CTYPE are valid variable assignments so file parsing may have stopped when encoutering the broken LANG entry.
C_TYPE is the wrong variable name,  the locale variables are listed in the output of locale.
Edit:
If you change to a tty (Ctrl+Alt+F6),  does locale's output still contain C.UTF-8?

Last edited by loqs (2020-04-09 18:52:07)

Offline

#18 2020-04-09 18:50:13

AcidGod
Member
Registered: 2019-02-13
Posts: 34

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

~/.profile

export QT_QPA_PLATFORMTHEME=gtk2

# export LC_ALL="en_US.UTF-8"

# Applications
export BROWSER="chrome"
export FILEMANAGER="thunar"
export TERMINAL="st"

# Configuration Files
export GTK2_RC_FILES="$HOME/.config/gtk-2.0/.gtkrc-2.0"
export PASSWORD_STORE_DIR="$HOME/.local/share/password-store"
export LESSHISTFILE="-"

#Program Settings
export LESS=-R
export LESS_TERMCAP_mb="$(printf '%b' '[1;31m')"
export LESS_TERMCAP_md="$(printf '%b' '[1;36m')"
export LESS_TERMCAP_me="$(printf '%b' '[0m')"
export LESS_TERMCAP_so="$(printf '%b' '[01;44;33m')"
export LESS_TERMCAP_se="$(printf '%b' '[0m')"
export LESS_TERMCAP_us="$(printf '%b' '[1;32m')"
export LESS_TERMCAP_ue="$(printf '%b' '[0m')"

# Switch escape and caps if tty and no passwd required:
sudo -n loadkeys ~/.local/share/ttymaps.kmap 2>/dev/null

export LF_ICONS="di=:fi=:ln=:or=:ex=:*.c=:*.cc=:*.clj=:*.coffee=:*.cpp=:*.css=:*.d=:*.dart=:*.erl=:*.exs=:*.fs=:*.go=:*.h=:*.hh=:*.hpp=:*.hs=:*.html=:*.java=:*.jl=:*.js=:*.json=:*.lua=:*.md=:*.php=:*.pl=:*.pro=:*.py=:*.rb=:*.rs=:*.scala=:*.ts=:*.vim=:*.cmd=:*.ps1=:*.sh=:*.bash=:*.zsh=:*.fish=:*.tar=:*.tgz=:*.arc=:*.arj=:*.taz=:*.lha=:*.lz4=:*.lzh=:*.lzma=:*.tlz=:*.txz=:*.tzo=:*.t7z=:*.zip=:*.z=:*.dz=:*.gz=:*.lrz=:*.lz=:*.lzo=:*.xz=:*.zst=:*.tzst=:*.bz2=:*.bz=:*.tbz=:*.tbz2=:*.tz=:*.deb=:*.rpm=:*.jar=:*.war=:*.ear=:*.sar=:*.rar=:*.alz=:*.ace=:*.zoo=:*.cpio=:*.7z=:*.rz=:*.cab=:*.wim=:*.swm=:*.dwm=:*.esd=:*.jpg=:*.jpeg=:*.mjpg=:*.mjpeg=:*.gif=:*.bmp=:*.pbm=:*.pgm=:*.ppm=:*.tga=:*.xbm=:*.xpm=:*.tif=:*.tiff=:*.png=:*.svg=:*.svgz=:*.mng=:*.pcx=:*.mov=:*.mpg=:*.mpeg=:*.m2v=:*.mkv=:*.webm=:*.ogm=:*.mp4=:*.m4v=:*.mp4v=:*.vob=:*.qt=:*.nuv=:*.wmv=:*.asf=:*.rm=:*.rmvb=:*.flc=:*.avi=:*.fli=:*.flv=:*.gl=:*.dl=:*.xcf=:*.xwd=:*.yuv=:*.cgm=:*.emf=:*.ogv=:*.ogx=:*.aac=:*.au=:*.flac=:*.m4a=:*.mid=:*.midi=:*.mka=:*.mp3=:*.mpc=:*.ogg=:*.ra=:*.wav=:*.oga=:*.opus=:*.spx=:*.xspf=:*.pdf="
source ~/.env

~/.bashrc

# Path to your oh-my-bash installation.

if [[ -d /usr/share/oh-my-bash ]]; then
	export OSH=/usr/share/oh-my-bash
else
	export OSH=~/.config/oh-my-bash
fi

# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-bash is loaded.
OSH_THEME="agnoster"

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"

# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"

# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_OSH_DAYS=13

# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"

# Would you like to use another custom folder than $OSH/custom?
# OSH_CUSTOM=/path/to/new-custom-folder

# Which completions would you like to load? (completions can be found in ~/.oh-my-bash/completions/*)
# Custom completions may be added to ~/.oh-my-bash/custom/completions/
# Example format: completions=(ssh git bundler gem pip pip3)
# Add wisely, as too many completions slow down shell startup.
completions=(
  git
  composer
  ssh
)

# Which aliases would you like to load? (aliases can be found in ~/.oh-my-bash/aliases/*)
# Custom aliases may be added to ~/.oh-my-bash/custom/aliases/
# Example format: aliases=(vagrant composer git-avh)
# Add wisely, as too many aliases slow down shell startup.
aliases=(
  general
)

# Which plugins would you like to load? (plugins can be found in ~/.oh-my-bash/plugins/*)
# Custom plugins may be added to ~/.oh-my-bash/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
  git
  bashmarks
)

source $OSH/oh-my-bash.sh

# User configuration
# export MANPATH="/usr/local/man:$MANPATH"

# You may need to manually set your language environment
# export LANG=en_US.UTF-8

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
#   export EDITOR='vim'
# else
#   export EDITOR='mvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"

# Set personal aliases, overriding those provided by oh-my-bash libs,
# plugins, and themes. Aliases can be placed here, though oh-my-bash
# users are encouraged to define aliases within the OSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#

# Load aliases
source ~/.config/.aliasrc
# Load custom functions
source ~/.config/.func
# Load fuzzy search
[ -f ~/.fzf.bash ] && source ~/.fzf.bash

export PS1='$'

cat /etc/locale.conf

LC_ALL=en_US.UTF-8
C_TYPE=en_US.UTF-8

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_GB.utf8
en_US.utf8

Still same error

Last edited by AcidGod (2020-04-09 18:53:07)

Offline

#19 2020-04-09 18:52:45

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

seth wrote:

There's something in a locale.conf or anything else imported to the profile (.profile, bashrc, …) that sets the invalid value.

Create a new user, log in as that user ("sudo -u new_user bash -il" will do)
Same problem?

Offline

#20 2020-04-09 19:00:30

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

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

Offline

#21 2020-04-09 19:03:32

AcidGod
Member
Registered: 2019-02-13
Posts: 34

Re: Gtk-WARNING **: 18:09:11.981: Locale not supported by C library

seth wrote:
seth wrote:

There's something in a locale.conf or anything else imported to the profile (.profile, bashrc, …) that sets the invalid value.

Create a new user, log in as that user ("sudo -u new_user bash -il" will do)
Same problem?

New user did not cause any issues. I will start by commenting of bashrc and .profile and than investigate if that what causes the problem. Thanks for help

Offline

Board footer

Powered by FluxBB