Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

It seems that the gnome-terminal program use system default local as its default encoding when it is started. For some reason, I can not change the system default locale setting. I want to use another locale just in the gnome-terminal.

Currently, I have to change the locale in the menu manually each time I open a new instance of gnome-terminal. Is it possible to set the default locale of gnome-terminal (different from system default locale), or let gnome-terminal remember the last used encoding?

share|improve this question

Method one: set appropriate variables. For example (try running this from the shell):

LANG=C /usr/bin/gnome-terminal

(depending which locale settings you need you may want to set other variables, type "locale" to see the complete list)

If it works, you can wrap it as shell script (just save such line as sth like "myterm", make it executable and puth somewhere in the PATH) and just use "myterm" to spawn new terminals.

Method two: you can use similar trick inside gnome-terminal configuration. Enter profile preferences (Edit/Profile Preferences), click [x] Run a custom command instead of my shell, and use sth like


as your custom command. /path/to/mybash should be executable and contain

export LANG=C
exec bash

(or sth similar) Note that this is "per-profile", so if you use multiple terminal profiles, you may need to repeat it.

PS If you need multiple encodings, just create multiple profiles and use appropriate one whenever you need. Note that you can use

gnome-terminal --window-with-profile=ProfileName

to spawn specific profile from the shell (or from desktop icon or from toolbar icon or ...)

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.