Setting LANG env on Ubuntu

Marius Gedminas marius at pov.lt
Sun Sep 27 14:08:49 UTC 2009


On Thu, Sep 24, 2009 at 11:38:07PM +0300, David Harel wrote:
> I use Ubuntu Jaunty release 9.04.
> On my last attempt to update openoffice to 3.1 (from repository:  
> http://ppa.launchpad.net/openoffice-pkgs/ppa/ubuntu) I noticed that  
> openoffice can't do Hebrew file names anymore. I also got some warnings  
> from other tools such as digikam regarding locale settings.
> Digging into this problem I noticed that my LANG env is set to "C":
> $ echo $LANG
> C

Interesting.

> When I set it to: LANG=en_US.UTF-8 , both openoffice and digikam were fine.
> I also noticed that when I login on text mode (such as ssh localhost) I  
> get the LANG settings as expected: en_US.UTF-8

Usually the difference between console and GUI logins is that ~/.profile
(or ~/.bash_profile) is not executed in GUI logins.

Do you set LANG yourself in one of the shell dot files?

> Also I just tried to update my system  and I tried to remove all my dot  
> files and I tried to switch from xfce4 to Gnome but nothing seems to  
> resolve this problem.

You can select your language in the GNOME Display Manager.  That sets
$LANG appropriately for the login session.  I believe this setting is
remembered per-user (but I'm not sure where it gets stored).

GNOME's System -> Administration -> Language support lets you specify
the system default language too.  I think that setting gets stored in
/etc/default/locale, but I'm not sure how the system init scripts use
it.

IIRC /etc/environment was once used to specify the system-wide default
setting for LANG.

Hope that list of places to check helps you solve your problem.

Marius Gedminas
-- 
When I die I want to go peacefully
in my sleep like my ol' Grand
Dad...not screaming in terror like
his passengers.
		-- seen in a sig of Branden Robinson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20090927/fbd2622d/attachment-0001.sig>


More information about the ubuntu-users mailing list