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?


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 ...)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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