LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-30-2013, 01:06 PM   #1
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Rep: Reputation: 68
CLI lines wrapping overwrites in rxvt


This has been happening for me over several years, on several Slackware version - but I just never found the time to investigate it.

When I use rxvt, after a while, lines don't seem to generate new line characters, so when reaching the end of the line (when typing a long command) - it jumps to the beginning of the line (on the same row) and starts overwriting characters. I can still press Enter, and the command will run correctly - but it makes it a pain to type and edit commands. Also, if I press the Up Arrow key to bring back the last command - it comes back on a single line - even if it would have originally spanned several lines - which makes it impossible to edit.

I haven't figured what triggers this behaviour - as it seems to start out of the blue randomly, after working in rxvt for a while. Closing rxvt down and re-opening it cures it.

I have tried to type "reset" and "clear" in rxvt, and it doesn't seem to fix things. I've found this post, which seems to describe the same behaviour - but it doesn't have any answers:

http://www.linuxmisc.com/6-linux-x/123025a75f4ee526.htm
 
Old 07-01-2013, 08:18 AM   #2
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 393

Rep: Reputation: 81
Somewhere in my half-forgotten past I seem to recall encountering the same problem - which eventually led me to abandon rxvt. Maybe you could change to another 'terminal'? (xfce's terminal, kterminal - maybe even xterm (I can't remember if the latter had the same problem))
 
Old 07-01-2013, 02:19 PM   #3
torimus
Member
 
Registered: Apr 2013
Distribution: Slackware
Posts: 81

Rep: Reputation: Disabled
Are the dimensions of rxvt window changed before it starts happen ? For xterm running bash did helped to enable checkwinsize option in bash's init file like
Code:
[[ ${TERM,,} == *xterm* ]] && shopt -s checkwinsize
in $HOME/.bashrc
 
Old 07-01-2013, 03:19 PM   #4
yars
Member
 
Registered: Apr 2012
Location: Russia
Distribution: Slackware64-current
Posts: 249

Rep: Reputation: 24
Quote:
Originally Posted by perbh
Maybe you could change to another 'terminal'?
I have the same problem with xfce-terminal. I use it in maximized window mode, and I don't see the dependency between these behavior and the dimensions of window. Possibly this problem also exist in a text mode (on runlevel 3)?

Last edited by yars; 07-01-2013 at 03:20 PM. Reason: Typo
 
Old 07-01-2013, 04:38 PM   #5
D1ver
Member
 
Registered: Jan 2010
Distribution: Slackware 13.37
Posts: 598
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
I've seen the same problem before, across xfce-term, xterm and konsole (across multiple slackware versions). I've never found a solution to stop it happening, but usually just resizing the window when it starts happening will make things normal again..
 
Old 07-02-2013, 02:56 AM   #6
NonNonBa
Member
 
Registered: Aug 2010
Distribution: Slackware
Posts: 192

Rep: Reputation: Disabled
Are you all using bash? I remember I've encountered this with xterm. I suspected it had something to do with the ANSI color sequences or the special variables I used in my prompt (aka PS1). Can't remember if it fixed the problem though (I now use a plain string as prompt and mksh as daily shell with rxvt-unicode... no problem for years, but where's the fix?).
 
Old 07-02-2013, 04:07 AM   #7
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Original Poster
Rep: Reputation: 68
Quote:
Originally Posted by yars View Post
I have the same problem with xfce-terminal. I use it in maximized window mode, and I don't see the dependency between these behavior and the dimensions of window. Possibly this problem also exist in a text mode (on runlevel 3)?
I can't say that I've ever seen this problem running in non-X mode. But who knows
 
Old 08-04-2013, 12:39 AM   #8
Jelloir
LQ Newbie
 
Registered: Nov 2008
Posts: 5

Rep: Reputation: 0
I recently encountered a similiar issue. It turned out to be something weird in my .bashrc PS1 variable.

Try giving yourself a vanilla PS1 (like PS1='$ ') and see of the behaviour disappears.

Quote from http://www.ibm.com/developerworks/li...tip-prompt/#h1

Quote:
In addition to this change, we need to surround all non-printing characters with special bash escape sequences, "\[" and "\]". These sequences will tell bash that the enclosed characters don't take up any space on the line, which will allow word-wrapping to continue to work properly. Without them, you'll end up with a nice-looking prompt that will mess up the screen if you happen to type in a command that approaches the extreme right of the terminal.

Last edited by Jelloir; 08-04-2013 at 12:56 AM. Reason: Added link to IBM Article
 
Old 08-04-2013, 01:47 AM   #9
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Original Poster
Rep: Reputation: 68
I'm afraid I experienced the line wrapping problem over the years in several versions of Slack while having done no modifications to .bashrc
 
Old 08-04-2013, 05:54 AM   #10
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 688
Blog Entries: 1

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
I have never noticed that issue and have been using rxvt for years. What termcap are you using ? But one of the first things I do after an install is to copy /etc/termcap-BSD to /etc/termcap.

John
 
Old 08-04-2013, 12:15 PM   #11
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Original Poster
Rep: Reputation: 68
I am using whatever termcap Slackware installs by default. Any particular reason why the change to the BSD termcap is required after a fresh Slack install?
 
Old 08-04-2013, 05:15 PM   #12
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 688
Blog Entries: 1

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by xj25vm View Post
Any particular reason why the change to the BSD termcap is required after a fresh Slack install?
It is not "required", but I started using it years ago when I used Aterm with afterstep 1.8. termcap-BSD defines 'rxvt' which Aterm defaults to. I never got out of the habit of using the BSD version.
 
Old 08-04-2013, 07:42 PM   #13
STDOUBT
Member
 
Registered: May 2010
Location: Stumptown
Distribution: Slackware64
Posts: 583

Rep: Reputation: 242Reputation: 242Reputation: 242
I too, have learned to copy /etc/termcap-BSD to /etc/termcap.
Roughly, the difference as it was explained to me is that the termcap-BSD is more "feature-complete".
I use urxvt and have not seen that problem. I do have some other customizations which may affect the terminal's behavior, such as line 1985 in /etc/termcap (BSD version) to look like this:
Code:
rxvt-unicode-256color|rxvt-color|rxvt terminal emulator (X Window System):\
That helped get me out of ed mode though it might relate to the other problem as well. I also activated UTF-8 for virtual terminals in /etc/lilo
Code:
# Append any additional kernel parameters:
append=" vt.default_utf8=1"
HTH
 
Old 08-04-2013, 08:05 PM   #14
ttk
Senior Member
 
Registered: May 2012
Location: Sebastopol, CA
Distribution: Slackware64
Posts: 1,038
Blog Entries: 27

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
I've noticed problems with programs like "less" under xterm for several years, too. The solution has always been to copy my old (pretty ancient now .. slackware 7.1, iirc) termcap to the new install's /etc/termcap. That might have originally been a BSD termcap.

It's been a familiar problem for so long that it never occurred to me to report it as a bug. A bit embarrassing, thinking about that.
 
Old 08-04-2013, 08:45 PM   #15
ttk
Senior Member
 
Registered: May 2012
Location: Sebastopol, CA
Distribution: Slackware64
Posts: 1,038
Blog Entries: 27

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
For example, on a Slackware 14.0 system, with original-as-shipped /etc/termcap, with the following possibly-relevant environment variables:

Code:
# setenv | egrep 'TERM|LESS'
TERM=xterm
XTERM_SHELL=/bin/tcsh
TERMCAP=vs|xterm|xterm-color|vs100|xterm terminal emulator (X Window System):am:bs:km:co#153:li#61:ct=\E[3k:ue=\E[m:is=\E[m\E[?1l\E>:rs=\E[m\E[?1l\E>:eA=\E)0:as=^N:ae=^O:ac=aaffggjjkkllmmnnooqqssttuuvvwwxx:kI=\E[2~:kD=^?:kP=\E[5~:kN=\E[6~:k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:k0=\E[21~:F1=\E[23~:F2=\E[24~:kh=\E[H:kH=\EOw:ks=:ke=:te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:ms:pt:xn:xo:it#8:RA=\E[?7l:SA=\E?7h:bl=^G:cr=^M:ta=^I:cm=\E[%i%d;%dH:le=^H:up=\E[A:do=\E[B:nd=\E[C:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:DO=\E[%dB:ho=\E[H:cl=\E[H\E[2J:ce=\E[K:cb=\E[1K:cd=\E[J:sf=\ED:sr=\EM:st=\EH:cs=\E[%i%d;%dr:sc=\E7:rc=\E8:ic=\E[@:IC=\E[%d@:al=\E[L:AL=\E[%dL:dc=\E[P:DC=\E[%dP:dl=\E[M:DL=\E[%dM:so=\E[7m:se=\E[m:us=\E[4m:mb=\E[5m:mh=\E[2m:md=\E[1m:mr=\E[7m:me=\E[m:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:kb=\177:
XTERM_VERSION=X.Org 7.6.0(281)
XTERM_LOCALE=C
LESS=mqedX
LESSOPEN=|lesspipe.sh %s
Using an xterm, created via "xterm -display :0 -sb -sl 1024", I view multi-line text containing some blank and some non-blank lines (for this example I picked the output of "man fprintf", but a text file could have done just fine):

Code:
# man fprintf | less
So far, so good, (image) everything looks as it should.

Now I press "Enter" repeatedly, advancing the view one line at a time. When a non-blank line gets scrolled up from the bottom, it's fine, but when a blank line gets scrolled up from the bottom, it bears the text of less' progress indicator:

It should not do this. (image)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] TERM=rxvt / rxvt-unicode and ctrl-L irb Slackware 10 06-09-2010 05:09 AM
Closing x-windows causes my CLI resolution to change - cuts off bottom lines of txt thewizkid Linux - Desktop 2 01-14-2010 05:54 AM
Correct cli to specify and load alternativefonts in rxvt? Jim_B Puppy 2 01-29-2007 11:22 PM
Bash lines wrapping Ephracis Linux - Newbie 2 09-26-2006 07:35 AM
GRUB overwrites my changes mehlkelm Linux - Software 2 11-16-2004 03:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration