| View previous topic :: View next topic |
| Author |
Message |
qingbo Newbie
Joined: 28 Nov 2009 Posts: 4
|
Posted: Sun Nov 29, 2009 3:33 am Post subject: Bash doesn't wrap long lines? |
|
|
Hi,
I just got a linode with CentOS 5.3 installed (updated to 5.4 later). But when I type in a long command in ssh, it shows the command in one line, with the left side truncated, showing only a ">" character.
I know linode just includes the most necessary packages in the default image, but I'm wondering which package is needed to let bash behave like I see in the normal default installs? Or is it a bash configuration option?
Thanks in advance. |
|
| Back to top |
|
 |
jed Linode.com Staff

Joined: 28 Mar 2009 Posts: 357 Location: New Jersey
|
Posted: Sun Nov 29, 2009 3:36 am Post subject: |
|
|
The LISH console behaves like this, in my experience, when terminals are wonky. Are you using the LISH console, or are you SSH'd in to your Linode? You should definitely be using SSH for day-to-day work (LISH is for emergencies). _________________ Jed Smith
Developer & Systems Administrator
Linode.com |
|
| Back to top |
|
 |
qingbo Newbie
Joined: 28 Nov 2009 Posts: 4
|
Posted: Sun Nov 29, 2009 5:37 am Post subject: |
|
|
Thank you Jed.
I'm using putty on Windows to connect to my CentOS linode. I also use it to connect to some other Linux machines but this is the first time I see such behavior of bash. |
|
| Back to top |
|
 |
rsk Senior Member

Joined: 24 Nov 2009 Posts: 113
|
Posted: Sun Nov 29, 2009 2:44 pm Post subject: |
|
|
That's not an answer.
Do you make SSH connection with putty to yourlogin@yourlinode,
(qingbo@qingbosdomain.tld, qingbo@liXX-XXX.members.linode.com) or to LISH emergency console (linodeXXXXX@datacenterXX.linode.com) ?
If you're doing the latter, switch to the former. LISH, from mym understandng, emulates a serial terminal, 80x24. You can eventually change its dimesions with STTY, but it's verily not recommended. |
|
| Back to top |
|
 |
db3l Senior Member
Joined: 13 May 2009 Posts: 194
|
Posted: Sun Nov 29, 2009 3:14 pm Post subject: |
|
|
| rsk wrote: | | . You can eventually change its dimesions with STTY, but it's verily not recommended. |
Other than the hassle of having to do it, there's absolutely nothing wrong with adjusting the terminal size if you want over LISH. Terminal size is just a setting like any other; you don't hurt anything by changing it. True, as an virtual serial port LISH misses the automatic communication about size changes we've all grown to expect over other connections, but that certainly doesn't mean it can't handle different sizes.
I do agree with the point that there's little reason to use LISH if you have normal network access to your Linode, but if you do have to work through LISH, no reason you can't be comfortable and use a virtual console with large dimensions, or just ensure apps through LISH wrap properly within your client window.
-- David |
|
| Back to top |
|
 |
qingbo Newbie
Joined: 28 Nov 2009 Posts: 4
|
Posted: Sun Nov 29, 2009 9:33 pm Post subject: |
|
|
Sorry I didn't make it clear.
I was connecting directly to the IP address as root.
I'm relatively new to Linux so I don't know if there's anything wrong with these outputs?
| Code: |
# stty -a
speed 38400 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts -cdtrdsr
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
|
If I resize the Terminal (currently connecting from a Mac) window, stty does reflects the size changes.
Thank you very much. |
|
| Back to top |
|
 |
tinono Junior Member
Joined: 11 Jul 2009 Posts: 20 Location: Martinique
|
Posted: Mon Nov 30, 2009 5:03 am Post subject: |
|
|
I cannot know nor check if this is in any way related to your troubles, but still...
Linode's CentOS image ships a borked termcap package, the file /etc/termcap is empty.Reinstall termcap from the centos repos. This solved many terminal problems for me. (like ctrl+L not clearing the screen).
Also if you're using screen and long lines also don't wrap, adding this line in .screenrc solved it for me :
| Code: | | termcapinfo xterm* ti@:te@ |
No idea what is means though :-p
Hope it helps. |
|
| Back to top |
|
 |
qingbo Newbie
Joined: 28 Nov 2009 Posts: 4
|
Posted: Mon Nov 30, 2009 7:50 am Post subject: |
|
|
Thank you very much tinono!!
Reinstalling termcap solved the problem.
Thanks |
|
| Back to top |
|
 |
|