You are not logged in.

#1 2018-01-14 23:32:03

surrealpie
Member
Registered: 2017-10-10
Posts: 7

ssh server doesn't detect good terminal erase character

I cannot erase correctly, it just makes a space instead.
Weirdly i have this:
on the remote:

stty -a

speed 38400 baud; rows 60; columns 119; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc

echo $TERM
rxvt-unicode-256color

and exact same thing on my computer. So the remote knows it is communicating with urxvt, but still i cant erase.
Then i tried other terminals, like xterm

once again the output of stty -a and echo $TERM are the same on remote and local. Main difference from before is that erase is now the ^H character.
but it actually works with xterm
and it also works with urxvt, if i change the TERM variable to xterm, which seems really weird. So that's a workaround but i would like to understand and fix the problem.

I tried to do this on the server:

stty erase ^H

to no avail also; it now outputs ^? characters but when i actually send ^H i still get a space.

I also tried running zsh instead of bash, doesn't change anything

Also worth mentionning, no problem if i open remote vim, it's only bad in shell.

Last edited by surrealpie (2018-01-14 23:35:40)

Offline

#2 2018-01-24 08:59:41

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: ssh server doesn't detect good terminal erase character

Does the server know your terminal? Have you /usr/share/terminfo/r/rxvt-unicode-256color on the sever? (as it is your TERM variable). If not you should have a TERM variable that is understood by the server. Try to find a compatible one or change terminal.

Offline

#3 2018-01-24 12:41:33

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,525
Website

Re: ssh server doesn't detect good terminal erase character

To build on the above, your server should have a termininfo for rxvt-256color as that is provided by ncurses.  Byt rxvt-unicode-256color is only provided by rxvt-unicode-terminfo.

You can install rxvt-unicode-terminfo on the server if you really want to keep your TERM the same, but urxvt works with a wide range of common terminfos.  I run tmux in urxvt which sets term to screen-256color which works on a wide range of servers that I shell into.

Last edited by Trilby (2018-01-24 12:41:49)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB