Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
07-29-2004, 11:02 PM
|
#1
|
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852
|
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.
|
|
|
07-30-2004, 03:52 AM
|
#2
|
Senior Member
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140
|
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
|
|
|
07-30-2004, 04:51 PM
|
#3
|
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852
Original Poster
|
"stty onlret" doesn't seem to do anything.
|
|
|
07-30-2004, 05:49 PM
|
#4
|
Member
Registered: Jul 2004
Location: Silicon Valley, CA
Distribution: Slackware
Posts: 171
Rep:
|
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.
|
|
|
07-31-2004, 01:46 AM
|
#5
|
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852
Original Poster
|
Nope, no dice on that one either.
|
|
|
07-31-2004, 03:43 AM
|
#6
|
Senior Member
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140
|
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.
|
|
|
07-31-2004, 04:52 AM
|
#7
|
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852
Original Poster
|
"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?
|
|
|
07-31-2004, 05:08 AM
|
#8
|
Senior Member
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140
|
Try :
stty cols 40 rows 25
(adjust the 40 value to suit your needs)
|
|
|
07-31-2004, 05:19 AM
|
#9
|
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852
Original Poster
|
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?
|
|
|
07-31-2004, 07:08 AM
|
#10
|
Member
Registered: Sep 2003
Distribution: Slackware
Posts: 626
Rep:
|
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
|
|
|
08-01-2004, 01:58 AM
|
#11
|
Member
Registered: Feb 2002
Posts: 393
Rep:
|
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
|
|
|
08-01-2004, 05:33 AM
|
#12
|
LQ Newbie
Registered: Jul 2004
Distribution: Slackware
Posts: 22
Rep:
|
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.
|
|
|
08-01-2004, 07:07 AM
|
#13
|
Senior Member
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140
|
I would think that mdg points to the right thing, on your terminal try :
export PS1="\$ "
Then see if the wrapping problem has gone.
|
|
|
08-01-2004, 08:26 AM
|
#14
|
LQ Newbie
Registered: Jul 2004
Distribution: Slackware
Posts: 22
Rep:
|
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
|
|
|
08-01-2004, 08:42 AM
|
#15
|
LQ Newbie
Registered: Jul 2004
Distribution: Slackware
Posts: 22
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 12:26 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|