You are not logged in.

#1 2006-12-21 10:55:14

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

[SOLVED] keymappings, aterm, Eterm and screen

I'll start by saying that this first bit only seems to affect aterm.

On my own arch box backspace and delete both work fine in and out of screen but if I ssh to another box not running arch (ubuntu and redhat) and run screen backspace becomes delete.

It seems to be the keycode that is being sent generated rather than the mapping of the keycode to the actual activity. What I mean is, if I do a ctrl-v then backspace I get

^[[3~

rather than

^?

which means that even if I've done stty erase ^? it doesn't fix the problem as the backspace key isn't generating a ^?.

I've read a few how-tos on fixing problems like this but all seem to assume that the backspace key is sending the correct keycode in the first place.

This bit affects both aterm and Eterm.

With and without screen Home (ctrl-v produces ^[[7~) and End (^[[8~) are both broken when ssh'ing to other non-arch boxes. xterm produces ^[[H and ^[[F which both work fine.

So, the question, how can I fix this? I like aterm and would like to stick with it but I can't cope without backspace working. I'd also like Home and End working as I'm happy using them on my box the go somewhere else, forget and just end up with a ~ in the middle of my text.

Please help

Offline

#2 2006-12-21 16:05:15

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: [SOLVED] keymappings, aterm, Eterm and screen

What you need is one or both of:
a) a proper $TERM variable setting.  Make sure to set it to the exact terminal you're using (or you can fudge it a bit)
b) An ~/.inputrc ( mine here http://phraktured.net/config/.inputrc ) which handles goofy keys (verify you are using a login shell to use the global /etc/inputrc).

What does "echo $TERM" give you in all cases?

Offline

#3 2006-12-21 16:48:58

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: [SOLVED] keymappings, aterm, Eterm and screen

A quick check and if I start aterm TERM is xterm-color, if I change it to xterm then ssh to the other box and run screen backspace works even though TERM then equals screen.

I've also tried ssh'ing then changing term to vt100, xterm and xterm-color, none of those make a difference.

None of this fixes Home and End

I'll have a look at the link and see if that helps.

Offline

#4 2006-12-21 18:16:52

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: [SOLVED] keymappings, aterm, Eterm and screen

Starting aterm with "xterm-color" is your problem.  aterm is not xterm, nor is it xterm-color.  When screen starts, it uses your terminal definitions to determine key mappings as best it can.  You want your term to remain as "screen" when inside screen, but you also want to make sure that screen knows what terminal you're actually running.

Offline

#5 2006-12-21 19:01:53

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: [SOLVED] keymappings, aterm, Eterm and screen

You've got it big_smile . I don't know where it came from but there was a line in my .bashrc which said:

test -n "$DISPLAY" && export TERM=xterm-color

I've removed that line and TERM is now rxvt and everything works!

I'd love to know where I got that line from, it will be one I've copied and pasted in from somewhere.

Offline

#6 2006-12-21 19:22:40

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: [SOLVED] keymappings, aterm, Eterm and screen

Well, see, that's actually real common, but it's done in error.

The typical way people do something like this is as follows:
   "Hey I use aterm, but I don't have color"
   "Oh, set your term to xterm-color"

This is not the correct solution.  It works most of the time, because aterm and xterm have some overlap, but they are not the same.  aterm appears to NOT distribute it's own terminfo file (silly aterm).  It does appear to be a descendant of rxvt though, so if you want color, I'd suggest "rxvt-color".

Offline

#7 2006-12-21 21:22:53

dninja
Member
From: Sheffield, UK
Registered: 2006-04-29
Posts: 374
Website

Re: [SOLVED] keymappings, aterm, Eterm and screen

Colour works fine just just rxvt.

Offline

Board footer

Powered by FluxBB