LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 07-29-2004, 11:02 PM   #1
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Text not wrapping on console


I have an old laptop with Slackware 9.0 installed on it. It is a CLI only system, no X is installed.

Everything works fine except that text doesn't wrap on the command line.

What I mean is, that if I type to the edge of the screen, instead of the command line continuing to the line under the first one, the text appears on the same line as the starting point, and overwrites what I first typed.

I hope that makes sense.

What is the cause of this problem, and how can I fix it? As it stands any commands that are longer than a single line are hard to execute, at best. And the resolution on the screen is low in the first place, so most commands go off the screen.
 
Old 07-30-2004, 03:52 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
You can do something with proper parameter with stty command, but you will have to test parameter to fix your problem, test :

stty onlret

do stty --help for a list of parameter
 
Old 07-30-2004, 04:51 PM   #3
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Original Poster
Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
"stty onlret" doesn't seem to do anything.
 
Old 07-30-2004, 05:49 PM   #4
SiegeX
Member
 
Registered: Jul 2004
Location: Silicon Valley, CA
Distribution: Slackware
Posts: 171

Rep: Reputation: 38
give this a shot, I had the same problem when using PuTTY from work, if it works just toss it into /etc/rc.d/rc.local or /etc/profile
Code:
shopt -s checkwinsize

Last edited by SiegeX; 07-30-2004 at 05:50 PM.
 
Old 07-31-2004, 01:46 AM   #5
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Original Poster
Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Nope, no dice on that one either.
 
Old 07-31-2004, 03:43 AM   #6
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
Did you try :
setterm -linewrap on

Also, from the output of : echo $COLUMNS, did you check that number is correct by, for example count the number of caracter that are displayed correctly just before character come back on the line.

Last edited by Cedrik; 07-31-2004 at 03:46 AM.
 
Old 07-31-2004, 04:52 AM   #7
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Original Poster
Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
"setterm -linewrap on" doesn't change anything either.

And COLUMNS is set to 80, as it should be.

One thing I did notice though, which is going to be tough to describe...

Alright, this laptop have very old video hardware, the result of which is that getting a full-screen image is nearly impossible. It is always in a sort of letter-box. There is about an inch of black on the top, bottom, and right side of the screen. I think this black space is causing the problem.

If I just hold a key, and let it go to the end of the "letter-box" the text starts back on beginning of the current line, however when going over the line a second time, the text goes past the normal black border, and right to the edge of the LCD. When it hits the edge of the LCD, the text properly wraps to the next line.

So, I see two solutions for this. Either I need to get the text to always go to the edge of the LCD, ignoring the usual black border, or get the system to recognize the border as the end of the line, instead of the edge of the LCD.

Any ideas on how to get the machine to do either of those?
 
Old 07-31-2004, 05:08 AM   #8
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
Try :

stty cols 40 rows 25

(adjust the 40 value to suit your needs)
 
Old 07-31-2004, 05:19 AM   #9
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Original Poster
Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
That doesn't work either.

I tried adjusting the columns and rows with that command, but the system seems to ignore it. For example changing the columns to something low (15-20) doesn't have any effect. The text still goes as far as it did before.

Any idea why my console has ignored every command we have thrown at it?
 
Old 07-31-2004, 07:08 AM   #10
mdg
Member
 
Registered: Sep 2003
Distribution: Slackware
Posts: 626

Rep: Reputation: 37
Just an idea - I had a similar problem after I set up a custom bash prompt. Turns out there was a syntax error in the PS1 line. Fixed the error and the problem disappeared
 
Old 08-01-2004, 01:58 AM   #11
raid517
Member
 
Registered: Feb 2002
Posts: 393

Rep: Reputation: 30
I'm having this issue too. No text wrap on the console. None of the things suggested here work. Has anyone here got any clue how to fix it?

GJ
 
Old 08-01-2004, 05:33 AM   #12
tinhat
LQ Newbie
 
Registered: Jul 2004
Distribution: Slackware
Posts: 22

Rep: Reputation: 15
Same problem here. It's wierd because its only on the first line (the one with the prompt) line wrapping doesn't work. That first line will overwrite itself once, but then will go to the next line.
 
Old 08-01-2004, 07:07 AM   #13
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
I would think that mdg points to the right thing, on your terminal try :

export PS1="\$ "

Then see if the wrapping problem has gone.
 
Old 08-01-2004, 08:26 AM   #14
tinhat
LQ Newbie
 
Registered: Jul 2004
Distribution: Slackware
Posts: 22

Rep: Reputation: 15
Quote:
Originally posted by Cedrik
I would think that mdg points to the right thing, on your terminal try :

export PS1="\$ "

Then see if the wrapping problem has gone.
That works fo me! Problem seems to be in syntax error in PS1
 
Old 08-01-2004, 08:42 AM   #15
tinhat
LQ Newbie
 
Registered: Jul 2004
Distribution: Slackware
Posts: 22

Rep: Reputation: 15
Can anyone see a syntax error in this bash_profile?

set_prompt ()
{
local SAVE_CRS=`tput sc 2> /dev/null`
local RESET_CRS=`tput rc 2> /dev/null`
local CLOCKPOS=`tput cup 0 $(($HZ-10)) 2> /dev/null`
local FOREG=`tput setaf 6 2> /dev/null` #4
local ALT_FOREG=`tput setaf 3 2> /dev/null` #4
local BACKG=`tput setab 0 2> /dev/null` #6
local NORMAL=`tput sgr0 2> /dev/null`
local BOLD=`tput bold 2> /dev/null`

PS1="\${NORMAL}${SAVE_CRS}${CLOCKPOS}${FOREG}${BACKG}${BOLD} \@
${RESET_CRS}${BOLD}${ALT_FOREG}\]\u\[${NORMAL}\]@\h:\w\$"
}
set_prompt

PATH=$PATH:$HOME/bin:/sbin:/usr/sbin
export PATH PS1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How do I see all text in console? fannymites Linux - General 2 04-15-2005 06:01 PM
Desktop Text wrapping Commando464 Suse/Novell 1 10-23-2004 04:44 AM
Console text gamehack Slackware 6 09-25-2004 04:00 AM
wrapping text and scrolling using ncurses questioner Programming 1 10-12-2003 11:29 AM
Wrapping text in tables Graanco Programming 1 09-27-2001 04:04 PM


All times are GMT -5. The time now is 11:31 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration