View previous topic :: View next topic |
Author |
Message |
hw-tph l33t
Joined: 08 Jan 2004 Posts: 768 Location: Uppsala, Sweden
|
Posted: Thu May 13, 2004 12:48 pm Post subject: Terminal annoyances (broken linewrapping) |
|
|
After a fairly recent reinstall of laptop, going back to Gentoo, I have encountered a weird problem. As many experience, the default shopt setting in Gentoo for checkwinsize is to have it disabled, and that's fine with me. I have always had shopt -s checkwinsize in my ~/.bashrc (and my ~/.bash_profile sourcing my .bashrc) to turn it on in order to avoid typing over what I have already typed.
Now, after my recent reinstall of Gentoo, I can't seem to enable it again. It appears to be enabled, but it doesn't work - not in aterm, not in my framebuffer console:
Code: | hw@baron:~$ shopt | grep winsize
checkwinsize on |
If I type a line long enough to reach the end of the console it will - instead of wrapping - start over at the same line I am typing. And this is with checkwinsize set to on. I find this quite amazing, I have really no idea how it happened.
Any takers?
Håkan |
|
Back to top |
|
|
hw-tph l33t
Joined: 08 Jan 2004 Posts: 768 Location: Uppsala, Sweden
|
Posted: Tue May 25, 2004 6:10 pm Post subject: |
|
|
Almost a month since my original post, and still no solution. The funny thing this also appears on my main desktop now, which did not have this problem before. I've tried it all, with checkwinsize, without...always the same problem. In aterm, console, xterm...the same all over.
Håkan |
|
Back to top |
|
|
ArsDangor Guru
Joined: 20 May 2003 Posts: 477
|
Posted: Sun Jun 13, 2004 12:49 am Post subject: |
|
|
I've had the same problem with Konsole.
In my case, the problem was that it set the variable TERM to xterm, when it was actually Konsole.
All I did was
Code: | export TERM=konsole |
And then, for future konsole sessions, go to preferences->configure console and set the value for $TERM to "konsole".
I've got my line-wrapping working again.
Sorry if my answer is too late. |
|
Back to top |
|
|
John5788 Advocate
Joined: 06 Apr 2004 Posts: 2140 Location: 127.0.0.1
|
Posted: Sun Jun 13, 2004 1:17 am Post subject: |
|
|
hey this happens to me too on Eterm.
dont know whats wrong. _________________ John5788 |
|
Back to top |
|
|
hw-tph l33t
Joined: 08 Jan 2004 Posts: 768 Location: Uppsala, Sweden
|
Posted: Mon Jun 14, 2004 1:39 pm Post subject: |
|
|
I have no problem with setting the correct terminal type and whatever terminal type I use doesn't seem to matter. It appears on linux, xterm and aterm/rxvt all the same.
I have noticed now that it only appears when I have su'd to root. Very weird, especially since "shopt -s checkwinsize" is specified in both my own and root's ~/.bashrc (and ~/.bashrc is sourced from ~/.bash_profile in both cases so it is always set).
Håkan |
|
Back to top |
|
|
solka Apprentice
Joined: 25 Jun 2003 Posts: 287 Location: Torino - ITA
|
Posted: Mon Jun 14, 2004 2:05 pm Post subject: |
|
|
I have the same problem since I've installed linux and I can't get it working...I hope that a fix exists _________________ "The only reason of the man's sadness
is that he can't stay peacefully in his room."
Blaise Pascal |
|
Back to top |
|
|
Ian Goldby Guru
Joined: 18 May 2002 Posts: 539 Location: (Inactive member)
|
Posted: Mon Jun 14, 2004 2:23 pm Post subject: |
|
|
Try setting your prompt to something very simple. Sometimes incorrect control codes in your prompt (e.g. for colours) can cause exactly this behaviour. |
|
Back to top |
|
|
solka Apprentice
Joined: 25 Jun 2003 Posts: 287 Location: Torino - ITA
|
Posted: Mon Jun 14, 2004 2:25 pm Post subject: |
|
|
I solved my problem.
According to this post, but also to bash manpage, what causes wrong line wrapping are escaping characters in PS1/PS2. After fixing it I had correct line wrapping. _________________ "The only reason of the man's sadness
is that he can't stay peacefully in his room."
Blaise Pascal |
|
Back to top |
|
|
MagnusBerg Guru
Joined: 07 Oct 2003 Posts: 370 Location: Burgsvik, Gotland, Sweden
|
Posted: Mon Jun 14, 2004 3:33 pm Post subject: |
|
|
Look in you ~/.inputrc or etc/inputrc if you have a line with
Code: |
horizontal-scroll-mode on |
default, if there is nothing, is off |
|
Back to top |
|
|
hw-tph l33t
Joined: 08 Jan 2004 Posts: 768 Location: Uppsala, Sweden
|
Posted: Mon Jun 14, 2004 10:42 pm Post subject: |
|
|
Ian - bang right on the money! Thanks a lot. I had missed one escape sequence in root's PS1 line. Now, I'll take my stuff and go hide in shame somewhere for a while.
Håkan |
|
Back to top |
|
|
c07 Veteran
Joined: 25 Oct 2002 Posts: 1091
|
Posted: Mon Nov 29, 2004 5:01 pm Post subject: |
|
|
I had the same problem on a newly installed system. Bash ignored the horizontal-scroll-mode setting and treated it as always on (it has to if it doesn't know how to place the cursor a line up).
Re-emerging bash solved the problem. Seems it relied on some package (most likely readline) not present on the system at the time of the initial installation. Works well now, even with a colored PS1 and with all TERMs I use. |
|
Back to top |
|
|
humbletech99 Veteran
Joined: 26 May 2005 Posts: 1229 Location: London
|
Posted: Thu Jan 12, 2006 11:05 pm Post subject: |
|
|
sorry for reopening this thread but my post was blocked by a moderator and I was directed here.
I've got this same problem and I've tried commenting out everything in all the files that bash reads at startup, I eventually moved all the files away so that I just got a bare bash-3.1$ prompt but the problem with the x terminals remains.
Does anybody else have any advice on how to fix this? |
|
Back to top |
|
|
|