You are not logged in.

#1 2009-05-25 03:54:25

evilgold
Member
Registered: 2008-10-30
Posts: 120

What am i missing? (weird artifacts in terminal)

I dont really know how to describe this too well, so i've upload screen shots for comparison. One of my systems seems to display weird artifacts in place of what would normally be straight lines. This causes problems with lots of things not aligning properly, and it also looks really ugly.

I use the same programs on both computers, and i dont recall doing or installing anything special on the system that works fine.With some programs I will only have issues if im using screen. For example, mcabber will display just fine if i'm running a single terminal window or ssh session, but if i try to run it in screen i will have issues with the lines not displaying correctly and get a pretty much unusable screen. Other apps will look ugly regardless of if they are in screen or not (but they will look worse in screen)

For an example i used midnight commander, which has this behavior outside of screen,

Here is it looking normal on my desktop:
kaaliaacb.jpg

And here it is looking messed up:
kaallaacb.jpg

Any suggestions?

Offline

#2 2009-05-25 04:14:10

abesto
Member
From: Hungary
Registered: 2009-03-05
Posts: 49
Website

Re: What am i missing? (weird artifacts in terminal)

Well, it looks to me as if one of your tabs didn't support Unicode. Does this always happen? Also, what terminal emulator are you using? I find it unlikely, but could there be different character encoding settings for different tabs?


Linux user #476135 || Dotfiles hosted by GitHub

Offline

#3 2009-05-25 05:31:49

evilgold
Member
Registered: 2008-10-30
Posts: 120

Re: What am i missing? (weird artifacts in terminal)

abesto wrote:

Well, it looks to me as if one of your tabs didn't support Unicode. Does this always happen? Also, what terminal emulator are you using? I find it unlikely, but could there be different character encoding settings for different tabs?

I'm using mrxvt mainly, but this happens regardless of what terminal emulator im using. The system with the issue is the one i use from remote most often, so i've seen this happen in gnome-terminal, xfterm, and probably a few others.

Offline

#4 2009-05-25 05:56:54

abesto
Member
From: Hungary
Registered: 2009-03-05
Posts: 49
Website

Re: What am i missing? (weird artifacts in terminal)

I get similar output when the terminal/shell and the application aren't using the same locale. The system-wide default is in /etc/rc.conf
If that's the trouble, changing that line or running the apps as "LANG=en_US.utf8 mc" or something similar should help.


Linux user #476135 || Dotfiles hosted by GitHub

Offline

#5 2009-05-25 07:29:43

evilgold
Member
Registered: 2008-10-30
Posts: 120

Re: What am i missing? (weird artifacts in terminal)

Okay i seem to have narrowed things down a bit.

it seems that the remote computer (the one with the uglyness) is not handleing utf8 correctly. What i've got is that if i get onto that machine locally (instead of with ssh) and run mc, i get no problems... if i run "LANG=en_US.utf8 mc" however, i then see the issues again. Similarly, if i am on my desktop, and i remote in to the machine, if i run "LANG=en_US mc" (without utf8) i get a correct display, but with "LANG=en_US.utf8 mc" i have issues.

I'm still missing something though... what causes this behavior? how can i get utf8 to work properly?

Offline

#6 2009-05-25 07:42:00

abesto
Member
From: Hungary
Registered: 2009-03-05
Posts: 49
Website

Re: What am i missing? (weird artifacts in terminal)

Check the value of LOCALE in /etc/rc.conf. I'm pretty sure one machine will have "en_US", and the other "en_US.utf8".  Change "en_US" to "en_US.utf8", reboot, and you should be good.

Explanation: applications use the local locale (pun not intended). When you run on the problematic computer, both the terminal and mc have the same settings. However, when you ssh in, your terminal uses UTF8 (inherited from the local machine), but mc uses a non-utf locale (inherited from the remote machine).


Linux user #476135 || Dotfiles hosted by GitHub

Offline

#7 2009-05-26 06:28:16

evilgold
Member
Registered: 2008-10-30
Posts: 120

Re: What am i missing? (weird artifacts in terminal)

well i checked to see, both systems had en_US.utf8 in rc.conf. The problem happens on the machine when i specify "LANG=en_US.utf8 mc" even if im using it locally, but it does not if i use LANG=en_US. So its not a conflict between the 2 systems,  it is a lack of UTF8 support on the remote one.
I tried setting both systems to en_US but this didnt help any. It might be that for whatever reason the system is ignoring rc.conf and getting this setting elsewhere (but where?).

Is there a package that would reinstall en_utf8 support?

Last edited by evilgold (2009-05-26 06:31:17)

Offline

#8 2009-05-26 06:53:14

abesto
Member
From: Hungary
Registered: 2009-03-05
Posts: 49
Website

Re: What am i missing? (weird artifacts in terminal)

UTF8 support is right there. You get the weird characters, which means that mc is correctly outputting unicode, but the terminal doesn't display it as such. The problem here is that even your shell starts with the default locale, which is non-utf8. That's easy to check, just "echo $LANG" after starting a terminal locally (on the computer with the problem).
If you get en_US.utf8 then I'm completely lost, expert help is needed smile
Otherwise, the setting in rc.conf is overridden somewhere, most likely in your .bashrc or something similar. Grepping for LANG= in your home dir will hopefully tell you where exactly. If you use the same user locally and through ssh, then that explains why you get the problem from remote too. The config containing LANG=en_US is loaded just the same, no matter if you log in remotely or locally.


Linux user #476135 || Dotfiles hosted by GitHub

Offline

#9 2009-05-26 07:09:32

evilgold
Member
Registered: 2008-10-30
Posts: 120

Re: What am i missing? (weird artifacts in terminal)

abesto wrote:

If you get en_US.utf8 then I'm completely lost, expert help is needed smile

Well that makes 2 of us:

evilgold@sagan ~ $ echo $LANG
en_US.utf8

As a fix, for now i used .bashrc to set LANG=en_US. This works, but its not the kind of fix i would like.

Last edited by evilgold (2009-05-26 07:12:08)

Offline

Board footer

Powered by FluxBB