5

I'm running an embedded poky linux (linux-yocto v3.13) on a beagleboard. However, I'm having trouble when logging in over a serial using PuTTY: the terminal does not resize at all. Usually, the terminal resizes automatically when the PuTTY windows is resized. Not so in my case. The terminal stays at 80x24.

dmesg says

[    0.000000] Console: colour dummy device 80x30

at the beginning. However, when I start e.g. nano right after boot, it's actually 80x24.

When I do

stty columns 200
stty rows 50
reset

manually, the terminal still stays at 80x24. However, the stty changes do carry over when using a program, e.g. nano. So nano will be the correct size (200x50), but the actual terminal will stay small.

SET yields (even after the stty commands above!)

COLUMNS=80
LINES=24
PS1='\u@\h:\w\$ '

Now, I wouldn't have a problem with 80 columns per sé. However, long commands don't wrap to the next line, they just overwrite the beginning of the current line for some reason.

opqrstuvwxyzabcdefghijkl^Cmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmn

I googled far and wide and the only "answers" that came up had to do with PS1 containing stray color codes that throw off the width calculation. However, that's not the case here.

I'd much appreciate some help in this matter, as I'm losing my sanity over this...

1
  • Had pretty much similar issue (including overwriting the beginning of the current line). The cause was that getty was starting without explicit terminal type, defaulting to vt220 which is 24x80. (although I noticed I could change columns). Solved by setting TERM env for [email protected] but I believe could be also set in kernel command line arguments. Please also check unix.stackexchange.com/a/224497/563995 (ofc I know way too late given the date of the question but might help smb else) Commented Dec 12, 2024 at 22:40

1 Answer 1

2

The cases where you do see resizing are likely telnet or ssh-connections where NAWS (negotiate about window size: RFC-1073) is supported.

A serial connection doesn't do that. It is a direct connection. As a workaround, you can run the resize program, like this:

resize

Further reading:

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.