Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Terminal annoyances (broken linewrapping)
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
hw-tph
l33t
l33t


Joined: 08 Jan 2004
Posts: 768
Location: Uppsala, Sweden

PostPosted: Thu May 13, 2004 12:48 pm    Post subject: Terminal annoyances (broken linewrapping) Reply with quote

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? 8O

Håkan
Back to top
View user's profile Send private message
hw-tph
l33t
l33t


Joined: 08 Jan 2004
Posts: 768
Location: Uppsala, Sweden

PostPosted: Tue May 25, 2004 6:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
ArsDangor
Guru
Guru


Joined: 20 May 2003
Posts: 477

PostPosted: Sun Jun 13, 2004 12:49 am    Post subject: Reply with quote

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
View user's profile Send private message
John5788
Advocate
Advocate


Joined: 06 Apr 2004
Posts: 2140
Location: 127.0.0.1

PostPosted: Sun Jun 13, 2004 1:17 am    Post subject: Reply with quote

hey this happens to me too on Eterm.

Code:
$ echo $TERM
Eterm


dont know whats wrong.
_________________
John5788
Back to top
View user's profile Send private message
hw-tph
l33t
l33t


Joined: 08 Jan 2004
Posts: 768
Location: Uppsala, Sweden

PostPosted: Mon Jun 14, 2004 1:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
solka
Apprentice
Apprentice


Joined: 25 Jun 2003
Posts: 287
Location: Torino - ITA

PostPosted: Mon Jun 14, 2004 2:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
Ian Goldby
Guru
Guru


Joined: 18 May 2002
Posts: 539
Location: (Inactive member)

PostPosted: Mon Jun 14, 2004 2:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
solka
Apprentice
Apprentice


Joined: 25 Jun 2003
Posts: 287
Location: Torino - ITA

PostPosted: Mon Jun 14, 2004 2:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
MagnusBerg
Guru
Guru


Joined: 07 Oct 2003
Posts: 370
Location: Burgsvik, Gotland, Sweden

PostPosted: Mon Jun 14, 2004 3:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
hw-tph
l33t
l33t


Joined: 08 Jan 2004
Posts: 768
Location: Uppsala, Sweden

PostPosted: Mon Jun 14, 2004 10:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
c07
Veteran
Veteran


Joined: 25 Oct 2002
Posts: 1091

PostPosted: Mon Nov 29, 2004 5:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
humbletech99
Veteran
Veteran


Joined: 26 May 2005
Posts: 1229
Location: London

PostPosted: Thu Jan 12, 2006 11:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum