You are not logged in.

#1 2007-09-02 01:58:53

pain of salvation
Member
Registered: 2007-05-22
Posts: 76

Openbox and locale problem

Hello you all!

I have just installed openbox, but when I try to use pacman, I got a locale error: warning: current locale is invalid; using default "C" locale

I have checked locale.gen, rc.conf etc., and everything was fine... So I logged into KDE, and there I have no locale problem with pacman... So why this is happening just when I am in openbox? Does anybody knows how to fix it?

Offline

#2 2007-09-02 08:11:03

timtux
Member
From: Gävle, Sweden
Registered: 2005-10-04
Posts: 178
Website

Re: Openbox and locale problem

#First off:
nano /etc/locale.gen
#Uncomment the locale you want to use.
locale-gen
#Run locale-gen, try  again.


http://timtux.net/ - my personal blog about almost everything

Offline

#3 2007-09-02 18:48:01

pain of salvation
Member
Registered: 2007-05-22
Posts: 76

Re: Openbox and locale problem

I already have done that, tried again, but I still have the problem... just in openbox, on kde and gnome, pacman do not give me any locale error.

And because of this problem, I cannot run sonata:

[alvaro@arch ~]$ sonata

(sonata:5830): Gtk-WARNING **: Locale not supported by C library.
        Using the fallback 'C' locale.
Taglib and/or tagpy not found, tag editing support disabled.
SOAPpy not found, fetching lyrics support disabled.
Python 2.5 or python-elementtree not found, audioscrobbler support disabled.
/usr/lib/python2.5/site-packages/sonata.py:1114: GtkWarning: locale not supported by C library
  gnome.init("sonata", __version__)
Traceback (most recent call last):
  File "/usr/bin/sonata", line 50, in <module>
    app = sonata.Base()
  File "/usr/lib/python2.5/site-packages/sonata.py", line 345, in __init__
    self.charset = locale.getpreferredencoding()
  File "/usr/lib/python2.5/locale.py", line 512, in getpreferredencoding
    setlocale(LC_CTYPE, "")
  File "/usr/lib/python2.5/locale.py", line 476, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

Last edited by pain of salvation (2007-09-02 18:58:46)

Offline

#4 2007-09-02 20:05:23

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: Openbox and locale problem

Try exporting LC_ALL in your ~/.bashrc.

export LC_LANG=en_EN.utf

(Or what ever you use.)


What entries are uncommented in /etc/locale-gen and what output does `locale -a` return?

Does the command return different values in openbox and kde/gnome?

Last edited by harlekin (2007-09-02 20:08:29)


Hail to the thief!

Offline

#5 2007-09-02 21:07:50

pain of salvation
Member
Registered: 2007-05-22
Posts: 76

Re: Openbox and locale problem

pt_BR.UTF-8 and pt_BR are uncommented in /etc/locale.gen

I am using pt_BR.utf8 in rc.conf:
LOCALE="pt_BR.utf8"

locale -a in openbox:

[alvaro@arch ~]$ locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
C
POSIX
pt_BR
pt_BR.iso88591
pt_BR.utf8

locale -a in KDE:

[root@arch alvaro]# locale -a
C
POSIX
pt_BR
pt_BR.iso88591
pt_BR.utf8

Edit: I added export LC_LANG=pt_BR.utf8 to .bashrc but still get that locale error.
Edit 2: if I use openbox with KDE, I don't have the problem. But if I use openbox only, I get the error.

Last edited by pain of salvation (2007-09-02 22:32:03)

Offline

#6 2007-09-03 05:21:51

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: Openbox and locale problem

Oh, sorry. I forget to ask additionally what's the output of `locale` in openbox and kde/gnome.

Though currently I have no solution, neither I can think of a possible cause of problem.

Concerning to the error, locale -a reports in openbox: http://www.scim-im.org/wiki/faq/general … nd_similar

Last edited by harlekin (2007-09-03 05:25:19)


Hail to the thief!

Offline

#7 2007-09-03 05:39:45

pain of salvation
Member
Registered: 2007-05-22
Posts: 76

Re: Openbox and locale problem

locale in kde/gnome:

[alvaro@arch ~]$ locale
LANG=pt_BR.utf8
LC_CTYPE="pt_BR.utf8"
LC_NUMERIC="pt_BR.utf8"
LC_TIME="pt_BR.utf8"
LC_COLLATE=C
LC_MONETARY="pt_BR.utf8"
LC_MESSAGES="pt_BR.utf8"
LC_PAPER="pt_BR.utf8"
LC_NAME="pt_BR.utf8"
LC_ADDRESS="pt_BR.utf8"
LC_TELEPHONE="pt_BR.utf8"
LC_MEASUREMENT="pt_BR.utf8"
LC_IDENTIFICATION="pt_BR.utf8"
LC_ALL=

locale in openbox:

[alvaro@arch ~]$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: Arquivo ou diret?rio n?o encontrado
LANG=pt_BR.utf8
LC_CTYPE=ja_JP.utf8
LC_NUMERIC="pt_BR.utf8"
LC_TIME="pt_BR.utf8"
LC_COLLATE=C
LC_MONETARY="pt_BR.utf8"
LC_MESSAGES="pt_BR.utf8"
LC_PAPER="pt_BR.utf8"
LC_NAME="pt_BR.utf8"
LC_ADDRESS="pt_BR.utf8"
LC_TELEPHONE="pt_BR.utf8"
LC_MEASUREMENT="pt_BR.utf8"
LC_IDENTIFICATION="pt_BR.utf8"
LC_ALL=

THERE is the problem, I think! How can I change that LC_CTYPE?

Last edited by pain of salvation (2007-09-03 05:43:08)

Offline

#8 2007-09-03 05:46:20

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: Openbox and locale problem

I think you should be fine, exporting this variable in your ~/.bashrc, too.

Still I have no clue why it's set to jp_JP. oO

I've just enabled pt_BR locales, too and set LANG and LC_ALL manually and everything is fine.

Last edited by harlekin (2007-09-03 05:47:05)


Hail to the thief!

Offline

#9 2007-09-03 05:53:50

pain of salvation
Member
Registered: 2007-05-22
Posts: 76

Re: Openbox and locale problem

I add to my bashrc:

export LC_LANG=pt_BR.utf8
export LC_CTYPE="pt_BR.utf8"
export LC_ALL=pt_BR.utf8

Now its fine!

Thanks a lot! big_smile

Offline

#10 2007-11-01 12:10:52

Jerry
Member
From: Philippines
Registered: 2007-09-14
Posts: 126

Re: Openbox and locale problem

As for the japanese locale you can comment it in autostart.sh

Last edited by Jerry (2007-11-01 12:11:08)

Offline

Board footer

Powered by FluxBB