Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have this really weird problem with X terminal emulators. I want to use UTF-8 and it works everywhere else in my system, but not in graphical terminals. When I start e.g. Urxvt and press öäå-keys it doesn't render anything. If I start a new Urxvt terminal inside the parent terminal everything works fine. Everything works also in tty (Crtl + Alt + F1).

We are using likewise-open to connect domain. I don't know, but can that cause some problems with locales?

What I have done before asking?

  • Trying different terminals (Urxvt and xterm), none is working
  • Trying to change font
  • Even tried different desktop environment (awesome and xfce)
  • Trying different shells (zsh, bash)

I have also tested with different users. A local user and one that uses likewise-open for domain authentication. With local user everything works, even they have same locale settings.

Here is output from running locale (both users have same locale settings):

LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8

As far as I have understand correctly LC_CTYPE is the environment variable that Urxvt uses.

I don't have any ideas how to fix this, but hopefully someone else has.

share|improve this question
    
Just to clarify: Xterm works from the beginning, URxVt only after running a second instance? Did you reboot your machine after setting the locales? –  mpy Apr 25 '13 at 9:06
    
Sorry my poor explanation. So none of terminals do not work from beginning, just terminals that I run from parent terminal works. I also rebooted my computer after settings locales. –  rainmaker Apr 25 '13 at 9:15
    
I tried to make your question clearer that all terminals are affected and emphasized that you have these problems only with likewise-open authentification. That's all I can do, as I don't know how likewise-open works, but @Gabe's answer probably gives you the right direction. –  mpy Apr 25 '13 at 11:09
    
Actually, I had missed the difference between local user and lightwise-open. The real answer is probably simply this: bugs.launchpad.net/ubuntu/+source/likewise-open/+bug/1162836 - the likewise-open pam config is broken; for Debian/Ubuntu a fix is packaged, for others I don't know, but comment #14 on that bug is probably the thing you need to check/fix. –  Gabe Apr 26 '13 at 7:29
    
It was bug on likewise-open and I manage to fix it by following comment #3. Thanks to @Gabe for helping with this problem. –  rainmaker Apr 29 '13 at 6:09
add comment

1 Answer

This looks as if you're setting $LC_CTYPE in your .profile or .bashrc or whatever. That hasn't been run before your first terminal, which therefore gets started without that in its environment:

init -(launches)-> Display manager -(launches)-> desktop env -(launches)-> terminal -(launches)-> shell

The shell then sources its startup file (.profile, .bashrc, .zshrc, .login, whichever it is for your shell), which sets the environment, and only then when you launch the terminal, it knows what locale settings it's supposed to use.

You need to set the LC_CTYPE further up the chain - where and how, depends on your desktop environment (I expect you're not using "just a window manager", probably gnome or KDE?), display manager (gdm or kdm or xdm or lightdm or whatever), init variant (traditional "sysv-style" or upstart).

share|improve this answer
add comment

Your Answer

 
discard

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.