fracs n00b

Joined: 23 Aug 2008 Posts: 2
|
Posted: Mon Jun 14, 2010 2:43 am Post subject: [solved] change default character encoding in Gnome Terminal |
|
|
Problem:
To change the character encoding used by Gnome Terminal, use the 'Terminal' menu. However, the change is not persistent. I particularly wanted a degrees-Centigrade symbol to appear in output of 'sensors', so I needed to select a UTF-8 character encoding.
Solution:
I discovered that Gnome Terminal does not honor the system-wide locale settings (see Gentoo localization guide). I learned that Gnome relies on locale settings supplied by GDM. GDM uses its own locale configuration file, /etc/X11/gdm/locale.alias, which turned out to be quite different to my system default.
1. Backup /etc/X11/gdm/locale.alias (just in case... you know how it is :))
2. Link /etc/X11/gdm/locale.alias to /etc/locale.gen (assumes you've already setup /etc/locale.gen)
3. Re-order the locales in /etc/locale.gen so the one you want GDM (and thus Gnome Terminal) to use is listed first (this is described in the comments of the original /etc/X11/gdm/locale.alias file)
4. Restart GDM (eg. /etc/init.d/xdm restart)
So now my system looks like,
/etc/locale.gen :
en_AU.UTF-8 UTF-8
...
/etc/X11/gdm/locale.alias --> /etc/locale.gen
This fixed a couple of problems:
1. Now the default character encoding for Gnome Terminal is 'Unicode (UTF-8)'
2. The output of 'sensors' correctly shows the degrees-Centigrade symbol
3. When I launch AbiWord from the Gnome menu, the default language it uses is en_AU (an unexpected benefit)
So I am quite happy with this outcome |
|