How to change gnome session locale?

1

How do I change the default locale for my gnome session? I created /etc/default/locale-local with this content:

LANG=pt_PT.UTf-8
LC_MESSAGES=en_US.UTF-8

and added this to /etc/pam.d/gdm3, /etc/pam.d/gdm3-autologin, /etc/pam.d/gdm-welcome, /etc/pam.d/login, /etc/pam.d/su and /etc/pam.d/sshd:

session required pam_env.so readenv=1 envfile=/etc/default/locale-local

What am I missing?

Ninguém

Posted 2013-10-26T20:50:29.593

Reputation: 23

Answers

0

I am not sure why you are doing it piecewise. The normal route is:

  1. to check current settings:

    locale

  2. check existing locales

    locale -a

  3. chnage settings by either editing /etc/default/locale, or by using update-locale

    update-locale LANG=en_US.UTF-8 LC_MESSAGES=POSIX

  4. generate locales

    locale-gen locale-gen fr_FR.UTF-8

  5. change gdm settings, by editing /var/cache/gdm/$USER/dmrc

  6. rebooting.

Hope this helps.

MariusMatutiae

Posted 2013-10-26T20:50:29.593

Reputation: 41 321

Debian documentation advices against changing form us_US.UTF-8 for maximum compatibility! Maybe there are better ways?... – Ninguém – 2013-10-28T16:20:08.353

us_US.UTF-8 does not exist. As for the locales I used, I wrote them as examples. I do not know what you want to set, you can set whatever you like. The info I gave you come from https://wiki.debian.org/Locale and from http://serverfault.com/questions/54591/how-to-install-change-locale-on-debian

– MariusMatutiae – 2013-10-28T16:43:17.253

Right. I meant en_US.UTF-8. – Ninguém – 2013-10-28T22:00:56.643

From the debian documentation I mentioned: "It is good idea to install system wide default locale as "en_US.UTF-8" for maximum compatibility." I was trying to do just that, while at the same time changing locales via the PAM modules. – Ninguém – 2013-10-28T22:35:01.417

0

Ended up just creating a ~/.xsessionrc file with locale configuration on it:

LANG=pt_PT.UTf-8
LC_MESSAGES=en_US.UTF-8

I don't think ~/.dmrc would work since my home is 700.

Ninguém

Posted 2013-10-26T20:50:29.593

Reputation: 23