Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to set a locale for my user different than system locale.

By putting export LANG=en_US.utf8 in .bashrc I could do that for the shells, but still it's not working for applications not started via a shell (i.e. the desktop environment, LXDE, which is started through GDM3).

Is there any way to set a different default locale (used by any kind of application, even if not started via bash) for my user?

share|improve this question
Not .bashrc. Usually ~/.profile, but unfortunately there's no universal answer. See Alternative to .bashrc – Gilles Apr 17 '12 at 23:16

X login is annoyingly inconsistent about which startup file names are used. On the system I'm using you would just need to modify $HOME/.xsessionrc. But it does vary. I generally put my environment variable settings in a separate file and source that from .profile and .xsessionrc.

If .xsessionrc does not work for you, check the documentation or read the scripts in /etc/X11/.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.