-   Linux - General (
-   -   Terminal size shrinks whenever using nano over serial connection (

displace 07-21-2013 04:39 AM

Terminal size shrinks whenever using nano over serial connection

I'm running a serial connection to one of those neat ARM boards running linux. Basically I'm connecting via USB serial connection that pops up on my main linux machine as /dev/ttyUSB0. I use a program called "screen" to connect via this tty and login onto the remote board. The command is "screen /dev/ttyUSB0 115200" and I can successfully connect like this.

Now I'm being bugged by something. On my PC I use XFCE desktop and a terminal emulator, which I can resize at will with my mouse. The text from the serial session will normally strech across the whole terminal. However whenever I try to edit a file with a program like nano or vim, the terminal suddenly shrinks to a very small portion of the original size. Don't get me wrong, the terminal window stays the same size, but the content is suddenly limited to a very small portion on the top-left of the window. If I recall correctly, the dimensions are 24x80 characters.

Is there a way to use a larger terminal size?
I.e. how do I make it so that nano streches across the entire terminal window?

Thanks in advance!

gdejonge 07-24-2013 10:11 AM

It looks like nano is not using the TERM env variable or the variable is not set correctly.
Connect to the arm board and do:

echo $TERM

displace 08-07-2013 03:28 AM

Sorry for the late reply.

[root@alarm etc]# echo $TERM

gdejonge 08-09-2013 10:16 AM

Try changing it to 'xterm' or 'linux'


displace 08-11-2013 04:58 AM

# export TERM=linux
# export TERM=xterm

Neither of those seem to be working. Also, the variable $TERM gets reset upon logout. Nano is only one tool that shrinks the display, vim is another, and I've seen some more programs that do the same. Btw, is it wise to try and set it to xterm? The device does not have X11/xserver present, it is a console-only device.

All times are GMT -5. The time now is 09:24 PM.