Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Overview of UTF8 screen re-attachment issues.

Problem:

Creating a screen that uses UTF8 works perfectly until re-attaching said screen session.

Steps:

ssh remothost
screen -U -S ttytter
[detach screen]
[exit ssh]
xterm -class 'xterm-ttytter' -geometry 175x20 \
  -title 'ttytter' -e ssh -t remotehost "screen -dU -r ttytter"

Details

I am a really big fan of ttytter and have been using it for some time now. I have recently started using xterm vs xfce4-terminal/gnome-terminal as I find it is much cleaner. I am trying to use UTF8 for personal and professional reasons and I am still trying to work out a few bugs.

The initial attachment (creation) gives me UTF8 input that works like it should. $TERM is xterm-256colors while $LANG is en_US.UTF-8. This is also true once I re-attach the screen, although I am unable to use certain characters, such as backspace, which shows up as ^H.

It seems that the issue is specific to the command I am issuing to re-attach the screen. I am trying to figure out what it is that could be causing such an issue when I re-attach my UTF8 screen. I have tried -dr and -dU -r, both of which are failing to solve my problem. I have tried giving xterm the -u8 flag, giving me no change in behavior.

xterm -class 'xterm-ttytter' -geometry 175x20 \
-title 'ttytter' -e ssh -t remotehost "screen -dU -r ttytter"

The above causes problems.

ssh remotehost
screen -dU -r ttytter

The above works just fine.

Settings

.screenrc

defc1 off
defutf8 on
utf8 on

.Xdefaults

xterm*utf8: 1

.bashrc

export LANG=en_US.UTF-8

I will really appreciate any guidance on solving this issue.

share|improve this question
    
The problem lies within me setting xterm's -class. $TERM is correct, but something about the class is breaking character input. –  earthmeLon Mar 18 '12 at 18:53

2 Answers 2

I'm assuming you're getting garbled output, and if that's the case, try running the reset command, or maybe stty sane. This will treat the symptom, at least.

(Sorry if this should be a comment -- I don't have enough rep here to post one.)

share|improve this answer
up vote 0 down vote accepted

Solution

Different 'classes' load different configuration files from /etc/X11/app-default/. My problem was that my new xterm class did not have a matching configuration file.

# cd /etc/X11/app-default
# ln -s XTerm-color xterm-ttytter

The above will link XTerm-color's class settings for xterm-ttytter by creating a symbolic link. This way, any changes that are made to XTerm-color will automatically be applied to xterm-ttytter as well.

Credit goes to @Nei on Freenode/#xterm for explaining program classes for X11.

share|improve this answer
    
ttytter -readline is essential, as well. –  earthmeLon Jul 30 '12 at 22:43

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.