You are not logged in.
Hello,
when in, e.g., xterm terminal emulator, one types a long line exceeding the terminal's width, then the caret is automatically moved to the beginning of the next line. As if there were inserted two control characters: new_line and carriage_return.
In Gnome terminal (out of the box, without any customization) the caret, upon reaching the right terminal's end, is moved to beginning of the current line, and the text is continued to be typed from the left end of the existing text. As if only carriage return control character without new line were issued.
How this can be corrected?
Thanks.
Last edited by nbd (2017-03-30 23:11:59)
bing different
Offline
This sounds like either a broken prompt or a forced TERM variable.
Offline
Strange, I didn't made any customizations yet to the newly installed Arch with Gnome. The .bashrc is the original one:
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
The xterm terminal emulator works normally with long lines.
EDIT:
The second cause seems the case. Looks like the TERM variable is configured to be set to "term-256color" on the new Arch installation. And this causes some glitches in Gnome terminal.
Last edited by nbd (2017-03-30 23:10:43)
bing different
Offline
Can you explain what you did after you found out that the value of $TERM influences that behavior?
For me here, I remember I "fixed" it by disabling an option named "rewrap on resize". Normally, gnome-terminal remembers those long lines that exceed the window's width. It uses that to re-wrap lines when you resize the window. I thought that was a cute feature and would like to keep it. Does it work for you after whatever you did to $TERM?
Offline
I normally very rarely resize terminal window (I configured its initial size so that it fits for most cases), and if I expect a long lines in the output (e.g. in journalctl), I resize it beforehand, so that I haven't notice a need in rewrapping.
You can check the needed behavior yourself, by starting another terminal instance as follows:
$ TERM="" gnome-terminal
bing different
Offline
Looks like the TERM variable is configured to be set to "term-256color" on the new Arch installation.
Nope. Arch doesn't work like that. This is something you would have had to configure.
Offline
Nope. Arch doesn't work like that. This is something you would have had to configure.
I certainly didn't yet do any changes to configuration files yet (I'm busy with some work on another machine):
[root /]# grep -r xterm_256color /etc/*
[root /]# grep -r xterm_256color /home/*
[root /]# env | grep TERM
TERM=xterm-256color
Maybe terminals themselves set the TERM variable when it's not defined? In gnome-terminal this variable is set to "xterm_256color" (which apparently causes the problems with multiline commands):
[al ~]$ echo $TERM
xterm-256color
and in xterm this variable is set to "xterm":
[al ~]$ echo $TERM
xterm
bing different
Offline
Maybe terminals themselves set the TERM variable when it's not defined?
Yes, that is how it is supposed to work. It is only when you force a TERM variable that you see the sort of behaviour you described.
Offline