Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] change default character encoding in Gnome Terminal
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
fracs
n00b
n00b


Joined: 23 Aug 2008
Posts: 2

PostPosted: Mon Jun 14, 2010 2:43 am    Post subject: [solved] change default character encoding in Gnome Terminal Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum